StudyBrixFree worksheets, study guides and courses

Computer science · University

Functions and decomposition

A reusable named block that can accept inputs and return a result.

Make a worksheet

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

  1. Which concept would you apply first in a situation where the result a function sends back to its caller.

    1. Decomposition
    2. Function
    3. Return value
    4. Parameter
  2. Name the concept described as: Breaking a larger problem into smaller, testable parts.

  3. Which statement about Function is most accurate?

    1. The result a function sends back to its caller.
    2. Breaking a larger problem into smaller, testable parts.
    3. A reusable named block that can accept inputs and return a result.
    4. A local name representing an input in a function definition.
  4. Explain one important difference between Function and Parameter.

Answers and marking guidance

Answers and marking notes
  1. Return value

    The scenario directly calls for Return value.

  2. Decomposition

    The intended concept is Decomposition.

  3. A reusable named block that can accept inputs and return a result.

    The definition in the lesson notes gives the required condition.

  4. 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.