Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Control structures: sequence, selection and iteration

Question 1 of 10

Question 1 of 10

In the flowchart of a while loop, the condition is shown in a

Question 2 of 10

Question 2 of 10

In Python, the keyword used for "else if" is ___.

Question 3 of 10

Question 3 of 10

Write a Python loop that prints the numbers from 1 to 10.

Question 4 of 10

Question 4 of 10

Explain sequence, selection and iteration, giving a simple program example of each.

Question 5 of 10

Question 5 of 10

range(5) in Python gives the numbers 1 to 5.

Question 6 of 10

Question 6 of 10

What is the value of total after: total = 0; for n in range(1, 4): total = total + n

Question 7 of 10

Question 7 of 10

A loop that repeats as long as a condition is true is a

Question 8 of 10

Question 8 of 10

A loop that never stops is called

Question 9 of 10

Question 9 of 10

Write a Python program that asks for a mark and prints "Pass" if it is 50 or more and "Fail" otherwise.

Question 10 of 10

Question 10 of 10

for i in range(3) runs the loop ___ times.

Questions written by OtisamLMS in the style of the BECE. They are not WAEC past questions.