Activity 01
Pair Programming: Build Student Roster
Pairs create a dictionary to store class data: keys for 'name', 'grade', 'subjects'; add entries for five students. They write functions to search by name and update grades. Pairs swap code to test and suggest improvements.
Compare the advantages of dictionaries/objects over lists for specific data organization tasks.
Facilitation TipDuring Pair Programming: Build Student Roster, circulate and ask each pair to verbalize their decision for using a dictionary key before coding, reinforcing intentional structure design.
What to look forPresent students with a scenario, such as tracking student grades. Ask them to write down: 1. What would be the key? 2. What would be the value? 3. Why is a dictionary better than a list for this task?