How many times the inner loop runs
Predict the output · Medium · §7.6 Nested loops and the first math helper
Predict the output without running the code.
Code
count = 0
for i in range(3):
for j in range(i, 3):
count += 1
print(count)Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.