Home›Lesson Plans›Computer Science›Programming · Grade 4

Loops in Coding

Fourth graders explore loops, the coding trick that tells a computer to repeat steps instead of writing them over and over, and see how loops make programs shorter and smarter.

Grade 4Loops in Coding45 minutes1 class periodUse → Modify → CreateExplicit teaching4 StandardsCSTA
Start the Lesson
Assign or share this lesson

Copy link works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment.

Lesson at a Glance

Everything you need before the bell rings

Learning Objectives

Students will be able to…

  • ✓Explain what a loop does.
  • ✓Tell loop types apart.
  • ✓See how loops save work.
  • ✓Spot a loop in code.
Essential Question

Drawing a square means repeating the same steps four times. How do loops let a computer repeat work without writing it out every time?

0
Lesson Phases
0
Vocabulary Terms
0
Standards Aligned
0
Interactive Task
Explore Loops · Interactive

Explore Loops

Project this and open each card to explore loops and how they repeat steps in a program.

🔁 Explore how loops repeat steps in codeTry it

The Lesson · Use → Modify → Create (a coding progression with Unplugged practice)

45 minutes, five moves

Tap any phase to open the teacher moves and student actions.

1

Hook — Say It Again

5 min

To draw a square, you repeat the same two steps four times: go forward, turn. Is there a shorter way to tell a computer to repeat?

👩‍🏫 Teacher Moves

  • Mime repeating steps.
  • Ask for a shortcut.
  • Set the goal.

🎒 Student Actions

  • Think.
  • Share.
  • Get ready.
2

Use — Explore Loops

12 min

Students explore loops.

👩‍🏫 Teacher Moves

  • Send students to Explore Loops.
  • Open each card.
  • Name the idea.

🎒 Student Actions

  • Explore.
  • Read.
  • Say it.
3

Modify — Loop It

13 min

Students rewrite repeated steps as a loop.

👩‍🏫 Teacher Moves

  • Take a list of repeated steps.
  • Rewrite it as a loop.
  • Say how many times it repeats.

🎒 Student Actions

  • Take.
  • Rewrite.
  • Say.
4

Create — Draw with Loops

15 min

Students plan a looped program.

👩‍🏫 Teacher Moves

  • Pick a shape or pattern.
  • Write the repeated steps.
  • Wrap them in a loop.

🎒 Student Actions

  • Pick.
  • Write.
  • Wrap.
5

Reflect — Repeat Smarter

5 min

Students reflect on loops.

👩‍🏫 Teacher Moves

  • What does a loop do?
  • Why use a loop instead of repeating code?
  • Complete the exit ticket.

🎒 Student Actions

  • Say it.
  • Say it.
  • Complete the exit ticket.
Standards Alignment

Built to the standards you report on

Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students.

CSTA
1B-AP-10

Create programs that include sequences, events, loops, and conditionals.

CSTA
1B-AP-08

Compare and refine multiple algorithms for the same task.

CSTA
1B-AP-11

Decompose problems into smaller, repeatable parts.

ISTE
5

Break problems into parts and use loops to automate repetition.

Differentiation

One lesson, every learner

Multilingual Learners

ELL / EMERGING READERS
  • Loop-idea picture cards.
  • Sentence frame: “Repeat ___ times: ___ .”
  • Explore one idea at a time.

Support & Access

IEP / 504
  • Start with repeat-a-set-number loops.
  • Act out a loop as a class.
  • Name one loop type at a time.

Stretch & Extend

GIFTED / EARLY FINISHERS
  • Trace a nested loop's output.
  • Rewrite a long program using loops.
  • Add a condition that ends a loop.
Materials

What to gather

  • 📽️Projector / board
  • 🖼️Loop-idea cards
  • 💻Explore Loops
  • 🧩Unplugged step cards
  • ✏️Pencils
  • 🎫Exit-ticket slips
Vocabulary

Key terms — hover for a quick definition

loopan instruction that repeats one or more stepsrepeatto do the same step or steps againcount-controlled loopa loop that repeats a set number of timesforever loopa loop that repeats until something stops itnested loopa loop placed inside another loopcodethe instructions that tell a computer what to dosequencesteps carried out in orderprograma set of instructions a computer follows
Evaluate

Exit Ticket

Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students.

QUESTION 1
What does a loop do in a program?
It repeats one or more steps, so you do not have to write them over and over.
QUESTION 2
Why use a loop instead of repeating code?
It makes the program shorter, easier to read, and easier to change, with fewer mistakes.
QUESTION 3
Give an example of something a loop could repeat.
For example, the four sides of a square, or the beat of a song (answers vary).

Create: draw with loops.

Have students pick a shape or pattern, write the steps that repeat, and wrap them in a loop, so repetition becomes a tool they can use. A printable loops worksheet is in the Computer Science library.

Study · Flashcards

Study the key terms

Tap a card to flip it, then rate whether you knew it. Built from this lesson’s vocabulary.

🃏 Loops in CodingFlip
Card 1
Term
Tap to flip →
Meaning
0

Nice work!

Practice · Quiz

Check your understanding

A quick self-check with instant feedback, drawn from this lesson’s key terms.

📝 Loops in CodingQuiz
Score: 0
1 / 6
Question 1
0%

Nice work!

Practice · Worksheet

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.

🖨️ Loops in CodingPrint
Name: ________________________
Date: ____________

Part A · Write the word that matches each meaning

Word bank: code, count-controlled loop, forever loop, loop, nested loop, program, repeat, sequence
  1. a loop that repeats until something stops it
  2. a loop placed inside another loop
  3. steps carried out in order
  4. a set of instructions a computer follows
  5. a loop that repeats a set number of times
  6. the instructions that tell a computer what to do
  7. an instruction that repeats one or more steps
  8. to do the same step or steps again

Part B · Show what you learned

  1. What does a loop do in a program?
  2. Why use a loop instead of repeating code?
  3. Give an example of something a loop could repeat.
Answer key — Part A: 1) forever loop · 2) nested loop · 3) sequence · 4) program · 5) count-controlled loop · 6) code · 7) loop · 8) repeat
Part B: 1) It repeats one or more steps, so you do not have to write them over and over. 2) It makes the program shorter, easier to read, and easier to change, with fewer mistakes. 3) For example, the four sides of a square, or the beat of a song (answers vary).