Star Triangles
Grow patterns.
Triangles of Stars! ⭐
Hi artist! 🎨 Today we draw triangles made of stars that grow bigger row by row! ⭐
Like this:
- *
- **
- ***
Let's learn the magic!
print('*')
print('**')
print('***')Growing Rows 📈
See how each row has MORE stars? Row 1 has 1, row 2 has 2, row 3 has 3. 📈
The trick: the inner loop runs a DIFFERENT number of times for each row!
for row in range(3):
print('Row', row, 'needs', row + 1, 'stars')All lessons in this course
- A Loop Inside a Loop
- Drawing a Grid
- Star Triangles
- Multiplication Table