I am learning python and i can\'t figure out why the following program is printing your number is greater than what i thought even when the guessed number is sm
Here datatype of guess is string where as datatype of number is integer,
guess = raw_input ("Guess:")
so both are not same, hence if statement is executed every time
if guess > number:
as string datatype is considered greater than integer datatype in python.
Therefor you need to change the datatype of guess to int.
Following code will help you do this
guess = int(raw_input ("Guess:"))