Computer science · lesson 3 of 4
Functions and decomposition
A reusable named block that can accept inputs and return a result.
Learn the ideas
Prerequisites: Basic computer literacy.
Function
A reusable named block that can accept inputs and return a result.
Parameter
A local name representing an input in a function definition.
Return value
The result a function sends back to its caller.
Decomposition
Breaking a larger problem into smaller, testable parts.
Worked examples
Which term best matches this description: A reusable named block that can accept inputs and return a result.
Function is the matching concept in this lesson.
Function
Which term best matches this description: A local name representing an input in a function definition.
Parameter is the matching concept in this lesson.
Parameter
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.