Activity 01
Pair Programming: Array vs Variables
Pairs code an array to hold 10 quiz scores, add a loop to find the maximum, then rewrite using 10 individual variables. Compare code length and edit time. Discuss scalability for larger datasets.
Compare the advantages of using an array versus individual variables for storing related data.
Facilitation TipDuring Pair Programming: Array vs Variables, circulate and ask each pair to explain why they chose one structure over the other before they run code.
What to look forPresent students with a scenario: 'You need to store the names and scores of 30 students for a single test.' Ask them to write down which data structure, an array or individual variables, would be more efficient and why, in one sentence.