What version of Python are you on? The code seems okay (at a quick glance). The only possible reason for it to be doing what it is doing is a potential error in division, for eg.



 chetan06:

float(running_corrects / 8151)


Can you try printing the actual value of running_corrects and replace the above with running_corrects/8151.0, while you’re at it?