Lesson 2: Numbers, chance and real dates from the standard library
16 min read·14 Oct 2026
Module 7 · Lesson 2 · About 50 minutes · Needs: Module 7 Lesson 1 (importandfrom ... import), Module 6 (functions,return,assert), Module 5 (lists and dictionaries)
The situation
Amira has stopped counting shelf days. "Use real dates," she says. "Jonah does not know what day 44 is. He knows it is Wednesday."
Until now you counted shelf days by hand. This lesson hands the counting to Python. You will follow Jonah's loan L04, Frankenstein, borrowed on Monday 14 September 2026, to a real "16 days late" on Wednesday 14 October 2026, picking up rounding and repeatable random choices on the way.