[Tutor] I am puzzled - help needed

John Carmona jeannot18 at hotmail.com
Fri Apr 1 01:05:19 CEST 2005

C Smith, Danny and Kent, thanks for the replies.

Here is my programme (I have reinstated the "while loop"

C Smith I like very much your method to get the last digits of a number.

It is WORKING NOW!! You can imagine how long I have spent on that, but I 
have learnt so much. Many thanks to all the people that have helped me, you 
will probably see me around asking a zillion other (very basics) questions.

from time import *

b = int(time())
running = True

while running:
    guess = int(raw_input ("Guess a number: "))

    if guess == b%100:
        print "Bravo, you guessed the right number"

    elif guess > b%100:
        print "Too high"

        print "Too low"


    print "just right"

print "Done"


More information about the Tutor mailing list