exception example

This commit is contained in:
Mert Gör 🇹🇷 2023-08-19 18:04:06 +03:00
parent 8583e8250a
commit e5c86877c9
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9

View File

@ -0,0 +1,8 @@
while True:
try:
val = int(input('Bir değer giriniz:'))
break
except ValueError:
print('Geçersiz bir değer girdiniz!')
print(val * val)