Don't you have the logic for the change backward? Look at lines 34 and 35 and think carefully (by the way, why do you need variable temp ?
Related: You can always instrument your logic blocks with a print statement that shows where you are. When in an infinite loop, hit Ctrl-C and look at the output. You often get a very good idea right away.
griswolf
Veteran Poster
1,165 posts since Apr 2010
Reputation Points: 344
Solved Threads: 256