exception example 4

This commit is contained in:
Mert Gör 🇹🇷 2023-08-19 19:13:17 +03:00
parent 24aafcdf45
commit c90b4be4b1
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View 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')