Every project / Art & Animation
🔤 ASCII Art Studio
Turn words into giant banners, draw the Mandelbrot fractal, and make patterns, all out of text.
- Language
- Python
- Level
- Beginner
- Category
- Art & Animation
What you'll learn
- Strings & loops
- Nested loops for 2D pictures
- Dictionaries of lists
- Complex numbers
- The math module
How it works
- font.py stores each letter as 5 rows of # and spaces.
- banner() builds the 5 rows of output letter by letter, swapping # for your ink character.
- mandelbrot() repeats z = z × z + c for every spot and shades it by how fast it flies off to infinity.
- wave() plots a sine curve on a grid and fills in the gaps where it's steep.
Files
| File | Lines | |
|---|---|---|
main.py | 28 | where the program starts |
art.py | 55 | imported by main.py |
font.py | 47 | A tiny block font. Every letter is 5 rows tall; # is ink, space is empty |
Challenges
Each one is a bit harder than the last. Teachers: these make good assignment instructions.
- Change the character the banner is drawn with.
- Design your own letters in font.py (maybe lowercase, or emoji-sized).
- Zoom into the Mandelbrot set by changing the x and y ranges.
- Draw a checkerboard or a spiral.
- Make the banner print in a rainbow of different characters, one per letter.