Activity 01
Pair Programming: Number Patterns
Pairs use range() in a for loop to print a right-angled triangle of stars or numbers. One student types the code while the partner predicts output and suggests changes. Switch roles after first pattern, then share one variation with the class.
Explain the purpose of a for loop in automating repetitive actions.
Facilitation TipDuring Pair Programming, pair students with differing comfort levels to encourage peer explanation of pattern logic.
What to look forPresent students with a simple for loop code snippet, e.g., `for i in range(5): print(i)`. Ask them to predict and write down the exact output before running the code. Then, have them run it to verify.