Skip to content
Code ReadingOdd Squares
Predict the Output

Odd Squares

Step through the loop in your head: which number is printed?
1total = 0
2for i in range(1, 6):
3 if i % 2 == 0:
4 continue
5 total += i * i
6print(total)