Which fix removes the bug?
age = input('Age: ')
print(age + 1)
- Convert with int() first
- Use print(age, 1) instead
- Declare age as global
- Call str() on the 1
input() always returns a string, and adding an int to a str raises TypeError.
Play Problem Solving ▸