how to finish a while loop...

icarus rsarpi at
Wed Feb 20 02:35:13 CET 2008

> To the original poster.... what environment are you running this in?
            Linux.  Xubuntu if that matters.

> When I put your program in notepad and run it from the windows command
> prompt it works.
            yeah yeah...same here.
After I got the tip that it actually worked, I went into the eclipse
directory where the program lives, ran it there from the shell, and it
worked.  Meaning, I didn't modify anything on the file itself (by
accident or on purpose).

> But when I paste it into eclipse and run it
> eclipse's console, it doesn't work because answer seems to have a
> stray '\r' carriage return (CR) and therefore the comparison to 'no'
> fails.
          I get no 'compile' errors there.
          I get regular execution but it just doesn't change the
condition to False at the very end.
          Therefore it loops forever.  I used other values like zeros
and ones to make sure I could print the values when the interpreter
got down to that line.  Everything checked.  Just didn't change the
condition on the main loop.

More information about the Python-list mailing list