In my guess the number program it gives me the error: \'>\' not supported between instances of \'str\' and \'int\' on line 26 in main. I would be grateful if someon
By default, input
returns a string. You need to convert your input to a numeric type, in this case integer.
Replace:
guess = input("Guess a number: ")
With:
guess = int(input("Guess a number: "))
You may also wish to validate user input to ensure that you have actually been provided with a valid integer. For this you should see Asking the user for input until they give a valid response.