Defining Functions
Bundle steps into reusable units.
Do this: Read the concept below, then try the quiz or activity.
Lesson 9 of 20
40%
Concept
Functions take inputs (parameters), do work, and return outputs. Keep them small and single-purpose. Name clearly to reveal intent.
Try it
Write a function that takes a list of numbers and returns the average.