break examples
This commit is contained in:
parent
3cd0f543f0
commit
6b03924aa4
8
break.for.example.py
Normal file
8
break.for.example.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
for i in range(5):
|
||||||
|
val = int(input('Bir değer giriniz:'))
|
||||||
|
if val == 0:
|
||||||
|
break
|
||||||
|
print(val * val)
|
||||||
|
else:
|
||||||
|
print('Döngü sonlandı')
|
||||||
|
print('Program sonlandı')
|
6
while.break.example.py
Normal file
6
while.break.example.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
while True:
|
||||||
|
a = int(input("Değer giriniz:"))
|
||||||
|
if a == 0:
|
||||||
|
break
|
||||||
|
print(a * a)
|
||||||
|
print("program bitti")
|
Loading…
Reference in New Issue
Block a user