Page 154 -
P. 154
data in files and arrays
Test Drive
It’s time to see if the program works. Use IDLE to create a new file using the code
from the previous page, save your program as high_score.py, and then run it by
pressing the F5 key:
Here's the program
typed into IDLE.
Oh, no, something's
gone south here...
Look's like you are trying
Oh dear. It looks like something’s gone wrong! The program has to convert something that
didn't look like a number.
crashed with a ValueError, whatever that is.
Study the error message produced by Python. Is there something wrong with
the Python code? Is there a problem with the file? Is there something wrong
with the data? What do you think happened?
you are here 4 119