I need a lesson.

Brent Fulgham brent.fulgham at xpsystems.com
Wed Jun 7 20:13:30 EDT 2000


> The following is a module called howfast.py that I can't
> get to repeat.  In Qbasic I would have used a goto at the end 
> and it would have worked fine.  Of course there is no goto in 
> Python and that where I can use anyone's help.  See if you can 
> understand what I'm trying to accomplish below, it's a little 
> scrambled towards the end, and tell me the error of my
> ways.  I have the book "Learning Python" but I'm still stuck. 
> If there are any questions I'll be glad to reply.

Turn to the chapter on "Flow Control" constructs (for/while loops).

You could solve this using any of the following:

1) a for loop
2) a while loop:

e.g.,
while 1:
  # text of your program
  # will loop for ever

Have fun,

-Brent




More information about the Python-list mailing list