An error is Python telling you exactly where it stopped and why. The habit that makes errors fast to fix is the same every time: read the last line first. It names the kind of error and gives a message. The line number just above it says where in your code Python stopped. This page breaks code six ways on purpose. Run each cell, read the last line, then fix the cell and run it again.
KeyError, and a message, like
'amount'. Most of the time this alone tells you the fix.File "<exec>", line 3 means line 3 of your cell.Run the cells top to bottom. Each one uses names from the cells above it, so skipping one gives a
NameError further down. Edit any cell and run it again.
Two broken functions. Each stub runs into an error or a wrong answer as it stands. Fix it so the tests pass. Read the error before you change anything.