# Nested Loops > Sixth graders learn nested loops — a loop inside another loop — and how they let programs work through grids, rows, and columns, powering everything from… **Computer Science** | **Grade 6** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g6-cs-nested-loops.html* Sixth graders learn nested loops — a loop inside another loop — and how they let programs work through grids, rows, and columns, powering everything from game boards to patterns. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Explain a **nested loop**. - See how loops **combine**. - Count the **repetitions**. - Use nested loops. One loop repeats a line of actions — but what if you need to fill a whole grid? You put a loop INSIDE a loop! How do nested loops work? ## Nested Loops Check Project each item and have students answer about nested loops. The tool explains loops inside loops and grids. ## 45 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — A Loop in a Loop One loop makes a row — but a whole grid? Put a loop inside a loop! #### 👩‍🏫 Teacher Moves - Show a grid pattern. - Ask how to fill it. - Set the goal. #### 🎒 Student Actions - Look. - Wonder. - Predict. ### Unplugged — Unplug It Students practice. #### 👩‍🏫 Teacher Moves - Act out an outer and inner loop. - Fill a grid by hand. - Count the runs. #### 🎒 Student Actions - Act it. - Fill it. - Count it. ### Use — Nested in Code Students use. #### 👩‍🏫 Teacher Moves - Send students to Nested Loops Check. - Note grids. - Count repetitions. #### 🎒 Student Actions - Answer. - Note it. - Count. ### Modify — Change It Students modify. #### 👩‍🏫 Teacher Moves - Change a loop count. - Predict the total. - Explain the change. #### 🎒 Student Actions - Change it. - Predict. - Explain. ### Create — Create Students conclude. #### 👩‍🏫 Teacher Moves - Design a nested-loop pattern. - Explain the counts. - Complete the exit ticket. #### 🎒 Student Actions - Design it. - Explain it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students. Use control structures including nested loops. Use loops to solve problems. Recognize patterns in code. Computational Thinker. ## One lesson, every learner ### Multilingual Learners - Loop diagram cards. - Sentence frame: “The inner loop runs ___ times.” - Use a grid. ### Support & Access - Start with a 2×2 grid. - Count aloud. - Use a diagram. ### Stretch & Extend - Nest three loops. - Make a multiplication grid. - Draw a pattern with loops. ### What to gather - 📽️Projector / board - 🔁Grid handouts - 💻Nested Loops Check - 💻Coding tool - ✏️Pens - 🎫Exit-ticket slips ### Key terms - **nested loop**: a loop inside another loop - **outer loop**: the loop on the outside - **inner loop**: the loop on the inside - **grid**: rows and columns - **iteration**: one pass through a loop - **repetition**: doing something again - **row**: a horizontal line - **column**: a vertical line ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Create: nest a loop. Have students describe a grid or pattern they could make with a nested loop. A printable nested-loops sheet is in the Computer Science library. ## Check your understanding **1. What does “nested loop” mean?** - rows and columns - the loop on the outside - a loop inside another loop *(correct)* - doing something again “nested loop” means: a loop inside another loop **2. Which word means: “the loop on the outside”?** - row - column - iteration - outer loop *(correct)* “outer loop” means: the loop on the outside **3. What does “inner loop” mean?** - a horizontal line - the loop on the inside *(correct)* - a vertical line - the loop on the outside “inner loop” means: the loop on the inside **4. Which word means: “rows and columns”?** - repetition - inner loop - iteration - grid *(correct)* “grid” means: rows and columns **5. What does “iteration” mean?** - the loop on the inside - the loop on the outside - one pass through a loop *(correct)* - rows and columns “iteration” means: one pass through a loop **6. Which word means: “doing something again”?** - repetition *(correct)* - grid - row - inner loop “repetition” means: doing something again ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g6-cs-nested-loops.html All lessons: https://lessonplans.k12academics.com/