Nested Loops

A common technique in programming is nested loops, where you put one loop inside another loop. For example, maybe we want to print the sum of the numbers between 1 and 10, 1 and 11, 1 and 12, all the way up to 1 and 20. This is a perfect use case for a nested loop:

Get hands-on with 1000+ tech skills courses.