Activity 01
Pair Programming: Save Quiz Scores
Pairs prompt users for name and score, write to 'scores.txt' using append mode. Run multiple times, then open the file to verify data. Extend by reading and displaying all scores.
Explain why file handling is important for data persistence.
Facilitation TipDuring the Pair Programming task, circulate with a checklist to note when pairs skip the close() call and immediately ask them to predict what the file will contain after the program crashes.
What to look forPresent students with a short Python code snippet that writes to a file. Ask them to predict the exact content of the output file after the code runs, explaining their reasoning for each line.