Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Programming in Python

Question 1 of 10

Question 1 of 10

What is the value of sum(range(1, 5))?

Question 2 of 10

Question 2 of 10

What does print(7 % 3) output?

Question 3 of 10

Question 3 of 10

What is len([1, [2, 3], 4])?

Question 4 of 10

Question 4 of 10

What is the output of print(2 ** 3)?

Question 5 of 10

Question 5 of 10

What is printed by: print("ghana"[1:4])

Question 6 of 10

Question 6 of 10

What does the following print? for i in range(3): print(i, end="")

Question 7 of 10

Question 7 of 10

What is the output of: print([x * 2 for x in range(3)])

Question 8 of 10

Question 8 of 10

Which Python statement displays text on the screen?

Question 9 of 10

Question 9 of 10

What does print("Hi" * 3) display?

Question 10 of 10

Question 10 of 10

How many times does for i in range(2, 10, 3) loop?

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