Update 17_exception_handling.md

Fix missing f in f-string
This commit is contained in:
ineb_di 2024-07-23 11:07:59 +02:00 committed by GitHub
parent 11023b3eb9
commit 2dfee6eee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ try:
name = input('Enter your name:')
year_born = input('Year you born:')
age = 2019 - int(year_born)
print('You are {name}. And your age is {age}.')
print(f'You are {name}. And your age is {age}.')
except TypeError:
print('Type error occur')
except ValueError: