This mock exam follows the shape of entry-level Python certification tests: short questions on operators, strings, collections, control flow, functions and exceptions. The questions are our own.
Most questions show a few lines of code and ask what they produce. Work the answer out in your head first, then store it in answer with the right type (a number, a text, a list). You can check your reasoning by running the code in a spare cell, but in a real exam you can't, so try first.
The last questions ask for small functions. Give yourself 30 minutes for the whole set and keep moving: skip a question that stalls you and come back.