On Sat, Sep 20, 2008 at 00:23, Wayne Watson <[EMAIL PROTECTED]> wrote: > Well, it made a difference, and now program and output are in agreement.
Not really the code has an error so it could not have worked. > updown = +1 > while keyop <> 0: You forgot to create keyop in this example. > UnboundLocalError: local variable 'updown' referenced before assignment > ... > http://effbot.org/pyfaq/how-do-you-set-a-global-variable-in-a-function.htm Did you actually read the link Kent provided? It does not look like you did. Greets Sander _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor