This question already has an answer here:
- How can I read inputs as numbers? 10 answers
I dont know what to do, how to fix this.
x = 13
y = input('So, How old are you?')
if x < y :
print('OK, so you are ' + str(y) + '. you are older than me!')
if x > y :
print('OK, so you are ' + str(y) + '. you are younger than me!')
File "c:/Users/Audio/Desktop/Intro to Python Development/MyBot.py", line 25, in if x < y : TypeError: '<' not supported between instances of 'int' and 'str'
Aucun commentaire:
Enregistrer un commentaire