Computer science · University
Functions and decomposition
A reusable named block that can accept inputs and return a result.
Prerequisites
Basic computer literacy.
Study notes
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
Which concept would you apply first in a situation where the result a function sends back to its caller.
- Decomposition
- Function
- Return value
- Parameter
Name the concept described as: Breaking a larger problem into smaller, testable parts.
Which statement about Function is most accurate?
- The result a function sends back to its caller.
- Breaking a larger problem into smaller, testable parts.
- A reusable named block that can accept inputs and return a result.
- A local name representing an input in a function definition.
Explain one important difference between Function and Parameter.
Answers and marking guidance
Answers and marking notes
- Return value
The scenario directly calls for Return value.
- Decomposition
The intended concept is Decomposition.
- A reusable named block that can accept inputs and return a result.
The definition in the lesson notes gives the required condition.
- Function: A reusable named block that can accept inputs and return a result. Parameter: A local name representing an input in a function definition.
Credit a clear distinction using both definitions and an appropriate example if supplied.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.
AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.