Python for Kids · Class 6 · Module 5 of 9

Functions as Building Blocks

A function is a spell you write once and can then cast whenever you like.

8 sessionsSessions 33–40
4 weeksTypical pace
BeginnerLevel
Class 6Python & Coding
A machine with an input arrow, gears inside and an output arrow
The big idea

Functions let students wrap a useful chunk of work in a name, hand it information, and get an answer back. Programs stop being one long scroll and start being a set of named parts that can be built and tested separately.

Why it matters

This is the first real engineering habit: solve a problem once, name it well, and reuse it. It is also the skill that makes larger projects possible at all.

Unpacked

What you will actually learn

Three core ideas, each taught with worked examples and then practised until it feels obvious.

01

Reusable code

Reusable code means writing the logic once and calling it by name. If the logic later turns out to be wrong, there is one place to fix instead of nine.

02

Parameters

Parameters are the slots a function leaves open for information. greet("Aarav") and greet("Meera") run the same code with different inputs.

03

Return values

return hands a value back to whoever called the function, so the answer can be stored, printed or fed into the next calculation. Printing and returning are not the same thing.

Did you know?

Professional codebases are judged less on cleverness than on naming. A function called calculate_total_price is worth more than one called ctp.

Common mix-up

“print and return do the same job.” print shows a value to a human; return gives it back to the program. Mixing them up breaks maths chains silently.

Session by session

Your 8-session journey

Sessions 3340 of the 72-session year, at two one-hour sessions per week.

  1. 1

    Warm-up and big picture

    Where this module fits, what you will build, and a hands-on starter that gets everyone curious about reusable code.

  2. 2

    Reusable code

    Guided teaching on reusable code, worked through together with the teacher.

  3. 3

    Reusable code — practice lab

    Independent practice, small challenges and one deliberate mistake to diagnose.

  4. 4

    Parameters

    Guided teaching on parameters, building directly on the previous two sessions.

  5. 5

    Parameters — practice lab

    Applied tasks that combine reusable code and parameters in one piece of work.

  6. 6

    Return values

    Return values introduced and practised, completing the toolkit needed for the project.

  7. 7

    Project build

    Guided build session for the module project: Mini calculator toolkit.

  8. 8

    Test, present and reflect

    Finish, test against the checklist, present the work and explain the decisions behind it.

Project lab

Mini calculator toolkit

Every module ends with something the student built themselves and can demonstrate. This is the piece that goes into their portfolio and gets explained out loud at the end of session 40.

Try this at home

Build a small toolkit of four functions — area of a rectangle, average of three numbers, Celsius to Fahrenheit, and a percentage — then use them all in one menu program.

It is finished when

  • It works from start to finish without breaking
  • You can explain every part of it in your own words
  • You tested it and improved at least one thing afterwards
  • Someone else used or understood it without your help

By the end of this module

Students finishing Module 5 can:

  • Explain and use reusable code without prompting
  • Explain and use parameters without prompting
  • Explain and use return values without prompting
  • Build and finish mini calculator toolkit
  • Test your own work and correct what you find
  • Talk an adult through what you made and why

Word bank

The vocabulary introduced here, in plain language:

function
A named, reusable block of code.
parameter
An input slot a function accepts.
return
The value a function sends back.
Module challenge

Think you have got this?

0 XPLevel 1 · Curious Beginner

6 quick questions drawn from this module — vocabulary, the project you build, and a myth-or-fact round. Every wrong answer explains itself, so a mistake still teaches you something.

🎯 6 questions⚡ Up to 80 XP

Your child's free trial is one message away.

Tell us your child’s class and what they enjoy. We will suggest the closest program fit—no pressure and no upfront payment.