jeudi 17 octobre 2019

Please Help Me With This If - Else. (Im 14) [duplicate]

This question already has an answer here:

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