import random guess = input('Guess The Number 0-10 ') if guess > 10: print('please guess a number less than 10')
when i run this code it says that the > dos not work and i dont know why
import random guess = input('Guess The Number 0-10 ') if guess > 10: print('please guess a number less than 10')
when i run this code it says that the > dos not work and i dont know why
What is the actual error message?
https://ibb.co/4MRppwL
The "number" you're entering is a string and the 10 in your code is an int, so you cannot compare them. You need to convert the string to an int before you compare them.
oh thats makes sence thank your a lifesaver(not really)