🏆 You built Snake!
You finished Project 5 — Snake! 🐍
From print('Hello') all the way to a real, playable arcade
game. Show your parents. Show your friends. You wrote every
single line. 🙌
What’s in your Snake game
- A green checkerboard built with nested
forloops - A blue snake stored as a list of
(x, y)positions - A game loop with
screen.ontimerthat ticks every 150 ms - A
move()function that slides the snake (add head, drop tail) - Four
go_*functions wired to the arrow keys withscreen.onkey - A red apple at a random spot, drawn with a separate pen
- A score counter drawn with
pen.write - The growing trick: skip the pop when you eat
- Wall + self collision detection, ending the game with
return
🧩 Want to tinker?
- Make the snake faster by changing
150inscreen.ontimer(move, 150)to80. Slower? Try300. - Change the snake color with
snake_pen.color(...). - Make the board bigger by changing
range(20)torange(25)(also bumpscreen.setupto 600×600 and the starting position math). - Make eating give 2 points instead of 1.
- Add a second apple at the same time!
🚀 Last project
In Project 6 — Invent Your Own, the page is blank. Make something yours — a story, art, a new game. Whatever you can dream up.