🗒 Cheat Sheet← Lesson
BitWithBite
Pygame Mastery Worksheet

🎮 Getting Started with Pygame

Module 2 of 20 · Level ★☆☆ · Time: 35 min
SCORE___ / 20
NameClassDate
After this worksheet you can
Initialize Pygame and open a windowWrite a correct game loop with eventsUse the Clock to control frame rateQuit the program cleanly
📚 Quick Recap

Every Pygame program follows the same shape: initialize Pygame, create a display Surface, run a loop that handles events/updates/draws every frame, then quit cleanly when the window closes.

🧠 Section A · Concept Check ● BEGINNER 4 × 1 = 4

1What must be called before any other Pygame function?
2What does pygame.display.set_mode((w,h)) return?
3What does clock.tick(60) do?
4Which event signals the user clicked the window's close button?

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5You loop through this frame's events with .
6The function that pushes your drawing to the actual window is .
7Why must screen.fill() happen before any drawing calls each frame?
8What three things happen, in order, inside a well-structured game loop iteration?
9Why should pygame.quit() be called after the loop ends, not inside it?

🚀 Section C · Challenge ● CHALLENGE 5

10If you forget to call clock.tick() at all, what happens to the game's frame rate and CPU usage, and why?
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-B   2-B   3-B   4-B  |  5 pygame.event.get()   6 pygame.display.flip() (or .update())   7 = it clears the previous frame so old drawings don't smear across the screen   8 = handle events, update game state, draw/render the frame   9 = calling it mid-loop would shut down Pygame while the loop is still trying to use it, causing errors  |  10 = without clock.tick() the loop runs as fast as the CPU allows — frame rate becomes wildly inconsistent across machines and CPU usage spikes to 100%, since nothing paces the loop

📄 Need offline practice?Download the print-ready PDF or open the one-page cheat sheet.
⬇ Worksheet PDF 🗒 Cheat Sheet