exception example 4
This commit is contained in:
parent
24aafcdf45
commit
c90b4be4b1
1 changed files with 7 additions and 0 deletions
7
python-temel/exception.example.4.py
Normal file
7
python-temel/exception.example.4.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
try:
|
||||
val = int(input('Bir değer giriniz:'))
|
||||
print(val * val)
|
||||
except TypeError:
|
||||
print('Girilen değerin türü uygun değil!')
|
||||
except:
|
||||
print('Diğer bir nedenden dolayı exception oluştu')
|
Loading…
Reference in a new issue