|
So far you have been thinking about functions as algorithms or machines. They take an input -- in the cases you have seen, a number -- and give an output.
Note 6
A function is really any relationship between an input variable and an output variable in which there is exactly one output for each input. Not all functions have to work on numbers, nor do functions need to follow a computational algorithm. Below are some examples of functions and non-functions. Read through them, then answer Problems E1-E4.
Note 7
The following relationships are functions.
Input: an integer
Output: classification of the input as even or odd
Input: a person's Social Security number
Output: that person's birth date
Input: the name of a state
Output: that state's capital
Input: the side length of a square
Output: the area of that square
Input: a word
Output: the first letter of that word
|