CS1302 Introduction to Computer Programming
def name(parameter list):
block
Example: pass user's input into function as parameter
The essential information includes:
The purpose of the function.
The role of each parameter.
The nature of the return value.
Question: what is the order of functions being called and what content will be printed ?
Output:
I am method 1.
I am method 2.
I am method 1.
I am method 1.
I am method 2.
I am method 3.
I am method 1.
I am method 1.
I am method 2.
Generally speaking, if you have the choice of using a standard library function or writing your own custom function that provides the same functionality,
choose to use the standard library routine.