Skip to main content

Functions: parameters, return values, and scope

Lesson time ~80 min · 5 skills · Grades 9–12

What you’ll learn

  1. Single parameter functionsNot started

    Define and call functions that accept one parameter

  2. Multiple parameter functionsNot started

    Define and call functions with multiple parameters in correct order

  3. Return valuesNot started

    Use return statement to send values back from functions

  4. Using return valuesNot started

    Capture and use values returned from function calls

  5. Local variable scopeNot started

    Understand that variables inside functions are separate from outside variables

Before you start

You should already know

  • Basic programming constructs
  • Code organization concepts

Skills this builds on

  • Function definition syntax
  • Function calling
  • Variable assignment
Notes for teachers

Scope is the most challenging concept - use visual diagrams showing variable 'boxes' inside vs outside functions. Practice with concrete examples like name conflicts. Return values should be practiced with immediate use of results to reinforce the concept.

How this module was checked

Status: Approved