Menu

Condition Controlled Iteration (While Loops) - Code Quiz

1. What is printed?

count = 1 total = 0 while count <= 5: total = total + count count = count + 1 print(total)
10
5
21
15

2. What is the value of x when it is printed?

x = 10 while x > 3: x = x - 3 print(x)
4
-2
1
7

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic