- Describe what a function does in your own words:
- A function (f) is a mathematical operation with variables (Ex = Input x) that changes the result depending on the value introduced in the variable. The value of the output depends on the value of the input.
- A function (f) is a set of rules that will be applied to an variable input (Ex= Variable x). The value of the output depends on the value of the input.
- Calculate the output of the following function
f(x) = {
x^2 if x is even
x+10 if x is odd
}
What will be the output for the following inputs?
- a) f(2) = Because 2 is an even number then = 2^2 = 4 = 4
- b) f(7) = 17 Because 7 is an odd number then = 7+10 = 17
- c) f(0) = 0 Because 0 is an even number then = 0^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 }