Project 2 — Target Practice 🎯
Draw an archery target on screen, shoot arrows at it, and use
Python’s if/elif/else to score points based on where
each arrow lands.
🎯 What you’ll build
A bullseye target with red and white rings. Each time you run your program, an arrow lands at a random spot and Python scores it: bullseye, inner ring, outer ring, or miss.
🧩 Python you’ll meet
turtledrawing with circles and fillrandom.randint(recap from Project 1)math.sqrtto measure distance-
if/elif/else— Python’s way of picking between options - 🧩 5 steps
- ⏱️ About 30 minutes
- 🏆 Type: Explore
Note: RPF’s original Target Practice uses the
p5graphics library. Our editor supportsturtleinstead, so the drawing code looks different — but the Python concept (if/elif/else) is the same.
Adapted from Raspberry Pi Foundation — Target Practice under CC BY-SA 4.0.