Drawing a Grid
Rows and columns.
Grids Are Everywhere! 🟦
Hi builder! 👷 A grid is rows and columns, like a chessboard, graph paper, or a tile floor! 🟦🟦🟦
Today we use nested loops to draw our own grids. Let's go!
for row in range(3):
print('A new row!')Rows and Columns 📏
A grid has two parts:
- Rows go side to side ↔️
- Columns go up and down ↕️
The outer loop makes rows, the inner loop fills the columns!
for row in range(2):
for col in range(4):
print('o', end='')
print()All lessons in this course
- A Loop Inside a Loop
- Drawing a Grid
- Star Triangles
- Multiplication Table