Question: what is the difference between a variable and a function?
Answer: Remember that variables are items which can assume different values. A function tries to explain one variable in terms of another. Consider the above example where the amount you choose to spend depends on your salary. Here there are two variables: your salary and the amount you spend.