Introduction
The for loop
The while loop
Nested loops
13. Nested for loops – introduction
break and continue
Summary

Instruction

Good job. Remember when we learned about nested if statements? Loops can be nested, too! Take a look:

for i in range (1, 11):
  for j in range (1, 11):
    print(i, 'x', j, '=', i*j)

This short code will print a multiplication table from 1*1 until 10*10. Let's see that in action.

Exercise

Run the template code and observe what happens.

You can see the multiplication results for all combinations from 1*1 until 10*10.