try except example
This commit is contained in:
parent
f7c8912b2a
commit
d262380b86
7
python-temel/try.except.py
Normal file
7
python-temel/try.except.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
try:
|
||||
s = input('Bir değer giriniz:')
|
||||
x = int(s)
|
||||
print(x)
|
||||
except ValueError:
|
||||
print('Girilen değer geçersiz!')
|
||||
print('Program sonlanıyor...')
|
Loading…
Reference in New Issue
Block a user