Activity 01
Pair Programming: Score Tracker Challenge
Pairs write a simple game score program using variables for current score and constants for max score or win threshold. They test by simulating plays, then swap a constant to a variable and observe errors. Discuss fixes and rerun.
Why is it important to choose the correct data type before processing information?
Facilitation TipDuring Pair Programming: Score Tracker Challenge, circulate and ask pairs to explain why they chose a variable for the score and a constant for the maximum value, listening for clear reasoning about mutability.
What to look forPresent students with short code snippets. Ask them to identify each variable and constant, and state its data type. For example: 'In the line `let playerName = "Alex";`, is `playerName` a variable or constant, and what is its data type?'