Sep-23-2019, 01:22 AM
So I am new to learning Phyton and I don't know what I did wrong here, I would appreciate it if you could help me and also if you could simplify your explanation a bit.
This is the code:
This is the code:
birthyear = input(' in what year were you born? ') age = 2019 - int(birthyear) print(' you are ' + age + ' years old. ')And this is the error I get:
Error:Traceback (most recent call last):
File "C:/Users/alicf/PycharmProjects/NOOB/yildan yas hesabi/erdo.py", line 3, in <module>
print(' you are ' + age + ' years old. ')
TypeError: can only concatenate str (not "int") to str