Skip to main content

Concept Of Object Oriented Programs In Python — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Concept Of Object Oriented Programs In Python — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ FPSC ★ PPSC

What is the main goal of object-oriented programming (OOP)?

Question 2 of 40
★ FPSC ★ PPSC

What is an object in the context of object-oriented programming?

Question 3 of 40
★ FPSC ★ PPSC

What is a class in the context of object-oriented programming?

Question 4 of 40
★ FPSC ★ PPSC

Which principle of OOP promotes the reusability of code and allows a class to inherit properties and methods from another class?

Question 5 of 40
★ FPSC ★ PPSC

What is the purpose of abstraction in object-oriented programming?

Question 6 of 40
★ FPSC ★ PPSC

What does built-in function type do in context of classes?

Question 7 of 40
★ FPSC ★ PPSC

What does single-level inheritance mean?

Question 8 of 40
★ FPSC ★ PPSC

Which of the following best describes polymorphism?

Question 9 of 40
★ FPSC ★ PPSC

What does encapsulation refer to in object-oriented programming?

Question 10 of 40
★ FPSC ★ PPSC

What is the benefit of using inheritance in object-oriented programming?

Question 11 of 40
★ FPSC ★ PPSC

Which principle of OOP emphasizes the bundling of data and methods that operate on the data into a single unit?

Question 12 of 40
★ FPSC ★ PPSC

Which of the following best describes inheritance?

Question 13 of 40
★ FPSC ★ PPSC

Which of the following statements is wrong about inheritance?

Question 14 of 40
★ FPSC ★ PPSC

What does built-in function help do in context of classes?

Question 15 of 40
★ FPSC ★ PPSC

Which of the following statements isn't true?

Question 16 of 40
★ FPSC ★ PPSC

What is polymorphism in object-oriented programming?

Question 17 of 40
★ FPSC ★ PPSC

What is the difference between a class and an object in object-oriented programming?

Question 18 of 40
★ FPSC ★ PPSC

What is a class variable in object-oriented programming?

Question 19 of 40
★ FPSC ★ PPSC

What is the biggest reason for the use of polymorphism?

Question 20 of 40
★ FPSC ★ PPSC

What is the use of duck typing?

Question 21 of 40
★ FPSC ★ PPSC

What is the purpose of the constructor (__init__ method) in a class in Python?

Question 22 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? >>> class A: pass >>> class B(A): pass >>> obj=B() >>> isinstance(obj,A)

Question 23 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class Demo: def __init__(self): self.x = 1 def change(self): self.x = 10 class Demo_derived(Demo): def change(self): self.x=self.x+1 return self.x def main(): obj = Demo_derived() print(obj.change()) main()

Question 24 of 40
★ FPSC ★ PPSC

What is the purpose of using abstraction in object-oriented programming?

Question 25 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def __str__(self): return '1' class B(A): def __init__(self): super().__init__() class C(B): def __init__(self): super().__init__() def main(): obj1 = B() obj2 = A() obj3 = C() print(obj1, obj2,obj3) main()

Question 26 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class Demo: def __init__(self): self.a = 1 self.__b = 1 def display(self): return self.__b obj = Demo() print(obj.a)

Question 27 of 40
★ FPSC ★ PPSC

A class in which one or more methods are only implemented to raise an exception is called an abstract class.

Question 28 of 40
★ FPSC ★ PPSC

How does inheritance promote code reusability in object-oriented programming?

Question 29 of 40
★ FPSC ★ PPSC

What is the main advantage of using abstraction in object-oriented programming?

Question 30 of 40
★ FPSC ★ PPSC

Which principle of OOP is related to creating new classes by extending existing classes?

Question 31 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def test(self): print("test of A called") class B(A): def test(self): print("test of B called") super().test() class C(A): def test(self): print("test of C called") super().test() class D(B,C): def test2(self): print("test of D called") obj=D() obj.test()

Question 32 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def one(self): return self.two() def two(self): return 'A' class B(A): def two(self): return 'B' obj1=A() obj2=B() print(obj1.two(),obj2.two())

Question 33 of 40
★ FPSC ★ PPSC

What type of inheritance is illustrated in the following Python code? class A(): pass class B(): pass class C(A,B): pass

Question 34 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def __init__(self): self._x = 5 class B(A): def display(self): print(self._x) def main(): obj = B() obj.display() main()

Question 35 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class objects: def __init__(self): self.colour = None self._shape = "Circle" def display(self, s): self._shape = s obj=objects() print(obj._objects_shape)

Question 36 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def __init__(self): self.__x = 1 class B(A): def display(self): print(self.__x) def main(): obj = B() obj.display() main()

Question 37 of 40
★ FPSC ★ PPSC

What will be the output of the following Python code? class A: def __init__(self,x): self.x = x def count(self,x): self.x = self.x+1 class B(A): def __init__(self, y=0): A.__init__(self, 3) self.y = y def count(self): self.y += 1 def main(): obj = B() obj.count() print(obj.x, obj.y) main()

Question 38 of 40
★ FPSC ★ PPSC

Which of the following is the most suitable definition for encapsulation?

Question 39 of 40
★ FPSC ★ PPSC

What is the purpose of the super() function in object-oriented programming?

Question 40 of 40
★ FPSC ★ PPSC

The purpose of name mangling is to avoid unintentional access of private class members.

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →