Draw pictures with text!
Use loops and strings to draw pictures made entirely of text characters. Create patterns, shapes, and art!
ASCII art is art made from text characters. Before we had emojis and color screens, people drew pictures using letters, numbers, and symbols. You will use loops to generate patterns and shapes from text!
๐ก Think of it like this:
Think of ASCII art like pixel art, but instead of colored pixels, you use characters like #, *, @, and spaces. Each character is like a tiny tile in a mosaic.
This project shows how loops and string multiplication can create visual output. It is a fun way to see the power of repetition and patterns in code.
Where you see this in real life:
ASCII art has been around since the 1960s! Some people can make incredibly detailed portraits using just text characters.
ASCII art is art made from text characters! Before we had emojis and color screens, people drew pictures using letters, numbers, and symbols. You will use loops to create patterns and shapes!
Let us start with a simple pattern โ a line of stars!
end='' keeps everything on the same line!๐ก end=""tells print() not to start a new line after each star.
Now let us make a triangle! Each row has more stars than the one before.
Click โถ Run to see the output!To make a box, we use nested loops โ a loop inside a loop! The outer loop handles rows, the inner loop handles columns.
Click โถ Run to see the output!Now for something cool โ a diamond shape! We combine spaces and stars.
Click โถ Run to see the output!Try creating your own patterns! Here are some ideas:
Click โถ Run to see the output!What does the end='' parameter do in print()?