Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Programming in Python

Question 1 of 10

Question 1 of 10

Which method adds an item to the end of a Python list?

Question 2 of 10

Question 2 of 10

If word = "computer", what is word[0:3]?

Question 3 of 10

Question 3 of 10

What is printed by: x = 1; while x < 10: x = x * 2; then print(x)?

Question 4 of 10

Question 4 of 10

What does list.append(x) do?

Question 5 of 10

Question 5 of 10

What does "Ghana"[0] return?

Question 6 of 10

Question 6 of 10

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

Question 7 of 10

Question 7 of 10

What is printed by: print(10 // 3, 10 % 3)

Question 8 of 10

Question 8 of 10

Which loop runs while a condition is true?

Question 9 of 10

Question 9 of 10

What is the output of print(type(5))?

Question 10 of 10

Question 10 of 10

What is the output of: d = {"a": 1}; d["b"] = 2; print(len(d))

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