Lectures 21 23
Lectures 21 23
functions and
modules
Topics
• math module
• random module
Defining and Calling a Function
(cont’d.)
• main function: called when the program starts
• Calls other functions when they are needed
Nested version
List Methods and Useful Built-
in Functions