I'm trying to run the below program and get it to print out feedback as the
loop goes. However, if you enter a number too high or too low, it skips the
print statement under the if and elif clauses and asks the user to "Guess a
number between 1-100" again. Any suggestions on how to get it to print the
"too high" and "too low" responses?? Once the number is entered correctly it
prints "Just Right" and exits correctly.
number = 44
while guess != number :
guess = int(raw_input("Guess a number between 1 - 100: "))
*if* guess > number :
*print* ("Too high")
*elif* guess < number :
*print* ("Too low")
*else*:
*print* ("Just right" )
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor