Lesson 1: A function that worked until it did not · 9 min
Before you begin · The bug · What went wrong
Learners sign in, so every finish and score is recorded. 7 fields to fill in with your details.



Minutes are an estimate.
Before you begin · The bug · What went wrong
Parts of a function · Predict · Check
When a class helps · Pick one · Check
Handle errors · Spot the smell
Which is more idiomatic? · Style checklist · Check
Review habits · Practice
Taken from the course itself.
What was the root cause of the wrong reports?
Answer: A mutable default argument. The default list was shared by every call.
Lesson 1: A function that worked until it did not
What does the example print?
Answer: 10. The assignment inside the function creates a local name. The outer count stays 10.
Lesson 2: Functions, arguments and scope
A class is a good choice when...
Answer: State and the actions on it belong together. A class fits when data and behaviour go together.
Lesson 3: Classes and object-oriented design
You need to group a customer's name and balance with a method to apply interest.
Best response: A small class.
Weaker responses: Global variables; A long if chain; A dictionary of functions.
Comments from trainers
No comments yet. Tell other trainers how the course went.
Your comment
Comments are public. We remove spam and personal details.