In the context of programming, a function is a named sequence of statements that performs a computation. When you define a function, you specify the name and the sequence of statements. It is common to say that a function “takes” an argument and “returns” a result. The result is called the return value. It may not be clear why