Importing Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Model 1 Random Numbers
Model 2 Multiple Modules
Model 3 Turtle Graphics
Nested Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Model 1 Lists of Lists
Model 2 Nested Loops
Model 3 Nested Dictionaries
File Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Model 1 Writing to a File
Model 2 Appending to a File
Model 3 Reading from a File
Visualizing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Model 1 Simple Plot
Model 2 Histograms
Model 3 CSV Data
Defining Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Model 1 Attributes and Methods
Model 2 Constructors
Model 3 Object-Oriented
Extending Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Model 1 UML Class Diagrams
Model 2 Single-Class Approach
Model 3 Derived Classes
Recursive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Model 1 Factorial Function
Model 2 Fibonacci Numbers
Model 3 Summation
Role Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Meta Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Team Roles, Team Disruptions, What Employers Want, Group vs Team, POGIL Research
Honor Code Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Panic Attack, A Friend Indeed, Oops!, Too Close for Comfort,
Let’s Make a Deal, A Friendly Assist, A Team Effort