Lab: Label twelve loans and total the fees
Module 4 · Lab · About 45 minutes · Needs: lessons 1 to 3 of this module, Module 3 (split,splitlines, f-strings) and Module 2 (int(),+=,min())
What you are building
Amira's question for this module is "Which of these twelve loans are overdue?" Each lesson answered a piece of it. Lesson 1 labelled one loan at a time, Lesson 2 walked all twelve with a for loop and totalled what is owed, and Lesson 3 counted late days with a while loop and stopped searches early with break.
This lab puts the pieces together in one notebook. You walk the twelve loans once, give each one a label (overdue, due soon, out, returned on time or returned late), work out its fee, and print a lined-up list for Amira with three totals: 580 pence owed, 140 pence already in the fee jar, and five loans that need a reminder. Then you check the answers two ways and look a loan up by its id.
Open a new Colab notebook, call it module-04-lab.ipynb, and run each cell in order.