Nested loop with a variable bound

for i in range(4): for j in range(i): c += 1 → 6

You can also choose a level by clicking its number.

About the course

Description
How many times the inner loop runs when its range depends on the variable of the outer loop
More information
The examples are in Python. Indentation determines what belongs to a loop or a condition.
Sample question
for i in range(4): for j in range(i): c += 1 → 6
Author
Jiří Preisler
Version
1.0