Quiz Complete, well Done!
What is the output of the following code?
i = 0
while i < 5:
i += 1
if i == 3:
continue
print(i)
How do you terminate a while loop?
What is the output of the following code?
i = 0
while True:
print(i)
if i == 5:
break
i += 1
In the context of the EdExcel Computer Science iGCSE course, where is the break statement used?
Which programming language supports the break statement?
Which loop is ideal when the number of iterations is unknown?
Which programming construct is commonly used with the 'continue' statement?
What is the syntax of a while loop?
What does the 'continue' statement do in a loop?
What is the purpose of a while loop?
Which loop is ideal when the number of iterations is known?
In which direction does the control flow transfer when a 'break' statement is encountered?
What happens when a 'continue' statement is executed in a loop?
What is the output of the following code?
i = 10
while i > 0:
print(i)
i -= 2
Which programming construct does the 'break' statement typically belong to?