Predicting how many times code runs

Predict the output · Medium · §7.5, §7.6 Nested loops and the first math helper

Predict the output without running the code.

Code

count = 0
for i in range(4):
    for j in range(4):
        if i == j:
            continue
        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.