jeudi 10 juin 2021

Trying to use if/else but it randomly prints one of the two options

first of all im new in coding and tried writing a very simple code that isn't to hard to understand but when im trying to use an if/else term it just randomly prints one of the two options and i dont really know what im doing wrong

if x > y:
    print("The first number is greater than the second number!")
elif x < y:
    print("The second number is greater than the first number!")
else:
    print("The numbers are even!")

x = input("tell me a number ")
y = input("thanks and now a second number please ")

maybe its pretty simple but idk how i could fix it, thanks in advance :)

Aucun commentaire:

Enregistrer un commentaire