Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

Legend

Hmmm this code isn't getting the right answer. Let's track what's going on with a print statement.  

What.. now I got the right answer.  
*Runs it a few more times*.
Okay, half the time I get the right answer of 94, the other half I get 109.

This makes no sense.
Is it somehow not starting with a clean slate before each test?