0Pricing
Coding for Kids · Lesson

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

  1. A Loop Inside a Loop
  2. Drawing a Grid
  3. Star Triangles
  4. Multiplication Table
← Back to Coding for Kids