Coding · Grade 4
Loops and Reusable Patterns
Fourth graders use counting loops (FOR i FROM 1 TO n), accumulate totals, counts and the biggest value so far, combine loops with decisions to count values that pass a test, and replace copied-and-pasted code with loops that capture the repeating pattern.
- 4 lessons
- About 85 minutes
- Loops check: 8 questions
- Ways to answer: program with blocks, choose an answer, put code in order, trace code and type a number
What learners will discover
- Use a counting loop and predict its output and how many times it runs.
- Use loops to accumulate a total, a count or the biggest value so far.
- Combine loops and decisions, for example to count values that pass a test.
- Replace copy-pasted code with a loop that captures the repeating pattern.
Lessons
-
Counting loops 4 steps2 practiceabout 16 min
-
Accumulating 5 steps3 practiceabout 16 min
-
Loops with decisions 5 steps3 practiceabout 16 min
-
Reusable patterns 4 steps2 practiceabout 16 min
-
Loops check 8 questions at the end
Keep exploring
Games to practice with
- Robot RoutesSnap together arrow, repeat and dance blocks to guide Bolt the robot home.
- Bug DetectiveA robot program almost works. Run it, spot the buggy block, and fix it.
- Sorting FactoryTurn a work order into if/else rules and watch the conveyor sort every item.
More 4th grade coding
- 4th Grade Coding Games5 games to play free
- 4th Grade Coding Worksheets10 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read