-
Describe what a function does in your own words
It’s a piece of functionality that can be called later, a bit like a black box that has input then it performs some function (does some processing) then returns an output -
Calculate the output of the following function
What will be the output for the following inputs?
- a) f(2) 4
- b) f(7) 17
- c) f(0) 0
- Write the definition of a function f that takes an input x, divides it by four and then outputs that result subtracted by 5.
f(x) = (x / 4) - 5