Apology accepted :)Quote:
Originally Posted by Interista
Yeah, taking a break can help. Anyway, you don't need 5 if statements in the loop body: the two that you had are fine. In fact, they are key to how you should write your loop condition. The logic should be something like this:Quote:
Originally Posted by Interista
Code:print request for guess
read input for guess
while guess is not in the range:
if guess is greater than the upper bound of the range:
print "too high"
else if guess is less than the lower bound of the range:
print "too low"
read input for guess