Forums

This code is not working i need help

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?

this is the image

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)