0

Beginner here learning python. I'm having an issue processing the follwing code. I'm trying to compare numbers but I am getting an "unorderable type error". I don't understand why, as both numbers being compared are integers.

winning_number = 5

guess = input("Can you guess the lucky number.\nHint it's between 1 and 10!\n")

def compare(guess):
    if guess > winning_number:
        print ("Wrong, you're guess is too high")
    elif guess < winning_number:
        print ("Wrong, you're guess is too low")
    else:
        pass

compare(guess)
MJ49
  • 123
  • 2
  • 11

0 Answers0