So when I'm trying to run this code. As you can see it asks for a number as an input.
print('How old is Vini?')
number= 17
guess= int(input('enter a number'))
if guess== number:
print('Bravo Vini is 17')
elif guess < number:
print('Vini is older than '+guess)
elif guess > number:
print('Vini younger than '+guess)
Now if the number is equal to 17 it executes but if the number is higher or lower it gives me this error:
When the number is higher:
Traceback (most recent call last):
File "C:\Users\ervin\Desktop\loja.py", line 9, in <module>
print('Vini younger than '+guess)
TypeError: must be str, not int
When the number is lower:
Traceback (most recent call last):
File "C:\Users\ervin\Desktop\loja.py", line 7, in <module>
print('Vini is older than '+guess)
TypeError: must be str, not int