python-CSD-kursu/python-temel/try.except.py
2023-08-12 18:09:56 +03:00

8 lines
160 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

try:
s = input('Bir değer giriniz:')
x = int(s)
print(x)
except ValueError:
print('Girilen değer geçersiz!')
print('Program sonlanıyor...')