mirror of
https://github.com/Asabeneh/30-Days-Of-Python.git
synced 2026-06-03 21:02:42 +08:00
Update 17_exception_handling.md
Fix missing f in f-string
This commit is contained in:
parent
11023b3eb9
commit
2dfee6eee3
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user