Coding · Grade 5
Functions and Parameters
Fifth graders define procedures with several parameters and call them with arguments, write functions that RETURN values used in expressions, trace calls inside loops and nested calls, and decompose programs (and robot routes) into functions with one clear job each.
- 4 lessons
- About 90 minutes
- Functions check: 8 questions
- Ways to answer: program with blocks, choose an answer, trace code, match pairs, type a number and sort into groups
What learners will discover
- Define a procedure with one or more parameters and call it with arguments.
- Write and use functions that return a value, and tell functions from procedures.
- Trace programs with calls, parameters and return values, including calls in loops and nested calls.
- Decompose a task into functions with clear jobs, including a robot function used with loops.
Lessons
-
Procedures with parameters 4 steps2 practiceabout 17 min
-
Functions that return a value 5 steps3 practiceabout 17 min
-
Tracing calls in loops 4 steps2 practiceabout 16 min
-
Designing with functions 5 steps2 practiceabout 17 min
-
Functions 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 5th grade coding
- 5th Grade Coding Games5 games to play free
- 5th 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