exception example 12
This commit is contained in:
parent
446f896752
commit
aa1eb420ad
13
python-temel/exception.example.12.py
Normal file
13
python-temel/exception.example.12.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
def foo():
|
||||||
|
print('foo begins...')
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
a = int(input('Bir değer giriniz:'))
|
||||||
|
if a == 0:
|
||||||
|
return
|
||||||
|
print(a * a)
|
||||||
|
except:
|
||||||
|
print('Exception oluştu!..')
|
||||||
|
finally:
|
||||||
|
print('finally!..')
|
||||||
|
foo()
|
12
python-temel/exception.example.12.py~
Normal file
12
python-temel/exception.example.12.py~
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
def foo():
|
||||||
|
print('foo begins...')
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
a = int(input('Bir değer giriniz:'))
|
||||||
|
if a == 0:
|
||||||
|
return
|
||||||
|
print(a * a)
|
||||||
|
except:
|
||||||
|
print('Exception oluştu!..')
|
||||||
|
finally:
|
||||||
|
print('finally!..')
|
Loading…
Reference in New Issue
Block a user