Activity 01
Pair Coding: Read and Average Scores
Students open a provided scores.csv file using csv.reader, parse rows into a list of floats, and compute the average score. They print results and handle non-numeric data with if checks. Pairs test on sample data, then swap files to verify.
Explain the advantages of using CSV files for structured data storage.
Facilitation TipDuring Pair Coding: Read and Average Scores, circulate and ask each pair to explain their averaging logic before they run the code to catch misplaced sum variables early.
What to look forProvide students with a small, correctly formatted CSV snippet and a malformed snippet. Ask them to write: 1) One sentence explaining the difference between the two. 2) One line of Python code that would successfully read the first snippet. 3) One potential error when trying to read the second snippet.