How to use these pages
Answer the question first, on paper. Then click the answer to unfold it.
Reading a worked answer feels like learning and mostly is not β recognising an answer is a completely different skill from producing one, and only one of them is any use in an exam.
Try it: click this line
That is what every answer on these pages looks like. Nothing is hidden from you β it is hidden from your eye, so that a page of questions stays a page of questions until you have had a go.
Grade 11 asked whether your code ran. These sets ask three harder questions, over and over: does this model the problem, what does this cost as the data grows, and what happens when somebody else calls it with input you did not imagine. Several questions hand you working code written by somebody else and ask you to extend it β that is not a different subject from writing your own, it is most of the job.
Nearly every answer here is code you can run, so predict first, then type it in, then let Python settle the argument. Being wrong at a keyboard costs nothing.
Two habits to bring from the concept pages. Write the docstring β including what the function assumes about its input β before you write the body. And when a question asks why, the answer is worth more than the code: βit worksβ is a claim about this afternoon, and the whole of Testing and Regression is about making that sentence longer.
Stuck partway through a set? That is the useful part, not a sign you have fallen behind β Getting Unstuck has the method.