✅ Checkpoint: Python
A mixed quiz on the whole Python course. Pass mark: 6 of 9 on the first try.
How this checkpoint works
Answer every question below without looking back at the topics. Only your first try counts. If you reach the pass mark, move on to the next phase. If not, the result tells you which topics to revisit; come back in a few days and try again (the second attempt is good practice, but be honest with yourself about the first).
Quiz
1. What does [x * 2 for x in range(4) if x % 2 == 0] evaluate to?
2. Which data structure gives the fastest "is x in it?" check?
3. X has shape (100, 3). What is the shape of X.mean(axis=0)?
4. Which pandas line keeps only rows where age is over 60?
5. You left-merge 1,000 appointments with a clinics table and get 1,240 rows. What happened?
6. Which git command records your staged changes in the history?
7. Why use a virtual environment for each project?
8. Which line creates one figure with two side-by-side charts in Matplotlib?
9. What is a good unit test?