You will save a list of numbers in a text file, one a line, close it, and read it back into a new list, as WRITEFILE and READFILE do.
Your tasks.
save, open the file for writing, write each number on its own line, and close it.load, open the file for reading, read count lines, turn each into an integer, and return the list.total to the total of the loaded list.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…