Skip to content
PlayOwl

Coding · Grade 6

Functions and Parameters

Learners define and call their own Python functions, follow the flow of control into and out of a function, pass arguments to parameters by position, and see the difference between returning a value and printing it. Robot puzzles with a reusable 'hop' function and a look at local variables show why functions make programs shorter, clearer and easier to change.

  • 4 lessons
  • About 80 minutes
  • Check what you learned: 8 questions
  • Ways to answer: fill in the blanks, program with blocks, choose an answer, put code in order, trace code and match pairs
See plans Included with Family, Teacher and School plans. Open in PlayOwl

What learners will discover

  • Define and call functions and trace the flow of control into a function body and back.
  • Pass arguments to parameters, matched by position, and predict the result of each call.
  • Distinguish return from print and use returned values in expressions and assignments.
  • Use functions to remove repetition and explain that variables created inside a function are local.

Lessons

  1. Defining and calling functions 6 steps3 practiceabout 18 min
  2. Parameters and arguments 6 steps4 practiceabout 20 min
  3. return versus print 6 steps4 practiceabout 20 min
  4. Reuse and local variables 5 steps2 practiceabout 18 min
  5. Check what you learned 8 questions at the end

Keep exploring

Games to practice with

More 6th grade coding

Guide for grown-ups