Skip to content
OtisamLMS
Computing

Computing · Quick practice · answer shown after each question

Object-oriented programming

Question 1 of 10

Question 1 of 10

Polymorphism means

Question 2 of 10

Question 2 of 10

What is printed? class Box: def __init__(self, w): self.w = w b = Box(5) print(b.w)

Question 3 of 10

Question 3 of 10

An object is

Question 4 of 10

Question 4 of 10

An object is an instance of a class.

Question 5 of 10

Question 5 of 10

A private attribute in Python is usually shown by

Question 6 of 10

Question 6 of 10

Which line creates an object of class Pupil?

Question 7 of 10

Question 7 of 10

A blueprint for creating objects is a ___.

Question 8 of 10

Question 8 of 10

State three advantages of object-oriented programming.

Question 9 of 10

Question 9 of 10

The Python constructor method is named ___.

Question 10 of 10

Question 10 of 10

self is used to refer to the current object in a Python method.

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