Activity 01
Pair Programming: Modular Game Scorekeeper
Pairs plan a simple game, then write functions for updating scores, checking wins, and displaying results. Test each function with sample data before combining them. Pairs swap programs to suggest improvements.
Analyze the benefits of using functions for code modularity.
Facilitation TipDuring Pair Programming: Modular Game Scorekeeper, assign one student to write the function while the other tests it immediately with different inputs to reinforce reusability.
What to look forProvide students with a small code snippet containing a function definition and a call. Ask them to: 1. Identify the function's name, parameters, and return value (if any). 2. Explain in one sentence what the function does. 3. Predict the output of the code snippet.