Activity 01
Pair Programming: Nested Game Simulator
Pairs design a text-based game loop with nested ifs for player choices and a while loop for retries. Start with pseudocode on paper. Code in Python or Scratch, test inputs, and swap roles to refine. Discuss why nesting handles multiple conditions.
Design a program that uses nested control structures to solve a multi-faceted problem.
Facilitation TipIn Problem Solver Design, ask students to sketch their nested structure on paper before coding, ensuring they plan the logic first.
What to look forPresent students with a short Python code snippet featuring a nested loop and an `if` statement. Ask them to write down the exact output the code would produce if run, and to circle the line number where the inner loop begins.