Chapter

Functions

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. What is a mathematical function?

    "In mathematics, a function is a mapping from a set of inputs to a set of outputs such that each input is mapped to exactly one output. For example, the function f ( x ) = x 2 maps numeric values to t

  2. How do functions work in programming languages?

    "In programming languages, a function (sometimes called subroutine or procedure) can take multiple inputs and produce one output value. We’ve already seen some examples of these functions. For example

  3. Why are functions useful in programming?

    "Defining and using functions in programming has numerous advantages. The most obvious advantage is that it allows you a way to organize code. By separating a program it into distinct units of code it

Functions | ComputerScienceOne | Bifalgorithm | Bifalgorithm