Everything you need before the bell rings
Learning Objectives
Students will be able to…
- ✓Define a nested loop.
- ✓Count the iterations.
- ✓Use it for grids.
- ✓Trace the output.
What happens when you put one loop inside another?
Nested Loops
Project each one and have students answer about nested loops.
55 minutes, five moves
Tap any phase to open the teacher moves and student actions.
Hook — Loops in Loops
How would you print a 3-by-4 grid of stars with loops?
👩🏫 Teacher Moves
- Pose the question.
- Share ideas.
- Set the goal.
🎒 Student Actions
- Think.
- Share.
- Get ready.
Use — Nested Loops
Students learn.
👩🏫 Teacher Moves
- Send students to Nested Loops.
- Note inner runs fully each pass.
- Note 3×4 = 12.
🎒 Student Actions
- Answer.
- Note it.
- Note it.
Modify — Trace It
Students practice.
👩🏫 Teacher Moves
- Trace a small nested loop.
- Count total iterations.
- Predict the output.
🎒 Student Actions
- Trace.
- Count.
- Predict.
Create — Create
Students apply.
👩🏫 Teacher Moves
- Write a nested loop.
- Make it draw a grid.
- Test the output.
🎒 Student Actions
- Write.
- Grid.
- Test.
Reflect — Reflect
Students close.
👩🏫 Teacher Moves
- What is a nested loop?
- How many runs for 2×5?
- Complete the exit ticket.
🎒 Student Actions
- Say it.
- Say it.
- Complete the exit ticket.
Built to the standards you report on
Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students.
Use nested control structures.
Justify the choice of control structures.
Test and debug loops.
Reason about repetition and scale.
One lesson, every learner
Multilingual Learners
- Grid/loop diagrams.
- Frame: "the inner loop runs ___ times."
- Trace a tiny grid.
Support & Access
- Use a 2×2 grid.
- Trace slowly.
- Use a visual.
Stretch & Extend
- Nest three loops.
- Draw a multiplication table.
- Analyze loop efficiency.
What to gather
- 📽️Screen / board
- 🔁Loop diagram
- 💻Nested Loops
- 📋Trace worksheet
- 📓Notebooks
- 🎫Exit-ticket slips
Key terms — hover for a quick definition
Exit Ticket
Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.
Reflect: nested loops.
Have students write a nested loop that draws a grid. A printable trace worksheet is in the CS library.
Study the key terms
Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.
Nice work!
Check your understanding
A quick self-check with instant feedback, drawn from this lesson’s key terms.
Nice work!
Printable worksheet
A print-and-go review sheet with a built-in answer key. Tap “Show answer key” to reveal answers, or print the clean version for students.
Part A · Write the word that matches each meaning
- follow the code by hand
- one pass of a loop
- rows and columns
- the loop on the outside
- a loop inside another loop
- the code a loop repeats
- a loop counter
- the loop inside
Part B · Show what you learned
- What is a nested loop?
- If outer runs 3 and inner runs 4, how many inner runs total?
- What are nested loops great for?
Part B: 1) A loop placed inside another loop. 2) 12 (3 × 4). 3) Grids, tables, and rows-and-columns problems.