🏠
Cozy house
A brown square with a triangle roof — your first drawing with two shapes.
Sprout· ages 8–1015 minfor loopspenup / pendownturtle.colorshapes
house.py
520×520
First load pulls ~10 MB of Python. Only happens once — the browser caches it after.
What should the output look like?
A brown square with a red triangle roof on top.
📖
How this works
Two shapes stacked: a square for the body, a triangle for the roof. The tricky part is moving between them without leaving a trail — that's what penup() and pendown() are for.
Your turn — try these
- 1Add a door — a smaller rectangle centered at the bottom of the body.
- 2Add windows (two small squares on the body).
- 3Add smoke coming out of a chimney (a small circle above the roof).