2. FUNCTION DEFINITION
Definition includes:
return value: the value the function returns to the part of
the program that called it
name: name of the function. Function names follow
same rules as variables
parameter list: variables containing
values passed to the function
body: statements that perform
the function’s task
3. DECLARING FUNCTION
Functions just like variables can return(store) a value
Code:
Declaring a Function:
def functionName (Parameters):
Function Body
return *if necessary
Common Errors: function names are case sensitive,
Trying to return a value with no return statement
4. CALLING A FUNCTION
Functions just like variables need to be called in
order to be invoked
Code:
Declaring a Function:
functionName (Parameters)