Jupyter Notebook Lab — Module 04#
Loops & Iteration
Practice writing for and while loops with accumulator patterns, loop control statements, and combined loop + branching logic applied to customer transaction data.
Download#
Student Notebook
.ipynb
🔑 Answer Key coming soon
Open the .ipynb file in Google Colab by selecting File → Upload notebook.
What You’ll Practice#
- Writing
forloops to iterate through lists and dictionaries - Building accumulator patterns — totals, filtered lists, summary dicts
- Combining loops and branching for customer classification
- Writing
whileloops with appropriate stopping conditions - Using
breakandcontinueto control loop execution
Learning Objectives#
By completing this notebook you will be able to:
- Write
forloops that iterate through lists and dictionaries - Apply the accumulator pattern to build totals, filtered lists, and summary dictionaries
- Combine
forloops withif/elif/elseblocks for data classification - Write
whileloops with correct stopping conditions - Predict the output of a loop before running it
Next Module: Module 05 — Functions & Abstraction →