Got the code? Welcome, builder!
You're heading into A Byte of Python & Turtle — instructors hand out the access code on day one.
You're heading into A Byte of Python & Turtle — instructors hand out the access code on day one.
Welcome to A Byte of Python & Turtle. One day, one language, one artwork. By this afternoon you'll have written a Python program that produces a different piece of generative art every time it runs, and you'll lock in your favourite for the gallery walk. I've watched a lot of first programs get written, and the ones from this workshop are the ones people actually want to keep.
starter/ folder and an example/ folder.starter folder to art- plus your first name: art-priya, art-marcus.1-shapes.py and click the run button (▶) in the top right of the editor. A turtle window appears; click the window to close it. If it appeared, you're ready.Download the art starterstarter.zip
You'll open a different file for each activity. Each one runs on its own, so there's no commenting out earlier work.
| File | Activity | What you'll do |
|---|---|---|
1-shapes.py |
2 — Hello, Turtle | Draw a square, a triangle, and a shape of your own |
2-loops.py |
3 — Loops & Variables | Use for loops and variables to build a mandala |
3-functions.py |
4 — Functions & Colour | Write draw_shape(sides, length, colour) and pick a palette |
4-compose.py |
5 & 6 — Compose | Scatter random shapes, then make one design choice your own |
The example/showcase.py file holds four finished pieces for inspiration. Don't peek yet, though. The first generative art you see today should be your own.