Activity 01
Pair Programming: CSV Reader Challenge
Pairs receive a sales data CSV file with quoted fields. They write code using csv.reader to parse rows, calculate total revenue, and print summaries. Switch roles midway to review partner's code.
Explain the advantages of using CSV files for data exchange.
Facilitation TipDuring Pair Programming: CSV Reader Challenge, circulate to ensure pairs discuss file properties before coding and use csv.Sniffer to detect delimiters.
What to look forProvide students with a small CSV file containing student marks. Ask them to write a Python code snippet using the `csv` module to calculate the average marks for a specific subject. Check their code for correct file opening, reading, and calculation logic.