Day 17 - Making a Text Grid Using Nested Loops

Today, we'll look at a few more advanced loop types, and then we will use this knowledge to build a text grid using nested loops.

Finished Code


xCounter = 0


while xCounter < 10:
    yRow = ""
    yCounter = 0
    while yCounter < 10:
        yRow += str(xCounter) + "-" + str(yCounter) + " "
        yCounter += 1

    print(yRow)

    xCounter += 1