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
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the main goal of object-oriented programming (OOP)?
Correct Answer: Option A — To model real-world entities and their interactions
Detailed Academic Explanation:
To model real-world entities and their interactions is the correct answer to “What is the main goal of object-oriented programming (OOP)”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 2 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is an object in the context of object-oriented programming?
Correct Answer: Option C — An instance of a class
Detailed Academic Explanation:
An instance of a class is the correct answer to “What is an object in the context of object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 3 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is a class in the context of object-oriented programming?
Correct Answer: Option A — A blueprint for creating objects
Detailed Academic Explanation:
A blueprint for creating objects is the correct answer to “What is a class in the context of object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 4 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which principle of OOP promotes the reusability of code and allows a class to inherit properties and methods from another class?
Correct Answer: Option C — Inheritance
Detailed Academic Explanation:
Inheritance is the correct answer to “Which principle of OOP promotes the reusability of code and allows a class to inherit properties and methods from another class”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 5 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of abstraction in object-oriented programming?
Correct Answer: Option A — It hides complex implementation details and only exposes essential features
Detailed Academic Explanation:
It hides complex implementation details and only exposes essential features is the correct answer to “What is the purpose of abstraction in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 6 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does built-in function type do in context of classes?
Correct Answer: Option B — Determines the class name of any value
Detailed Academic Explanation:
Determines the class name of any value is the correct answer to “What does built-in function type do in context of classes”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 7 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does single-level inheritance mean?
Correct Answer: Option C — A single subclass derives from a single superclass
Detailed Academic Explanation:
A single subclass derives from a single superclass is the correct answer to “What does single-level inheritance mean”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 8 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following best describes polymorphism?
Correct Answer: Option D — Allows for objects of different types and behaviour to be treated as the same general type
Detailed Academic Explanation:
Allows for objects of different types and behaviour to be treated as the same general type is the correct answer to “Which of the following best describes polymorphism”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 9 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does encapsulation refer to in object-oriented programming?
Correct Answer: Option C — It hides complex implementation details and only exposes essential features
Detailed Academic Explanation:
It hides complex implementation details and only exposes essential features is the correct answer to “What does encapsulation refer to in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 10 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the benefit of using inheritance in object-oriented programming?
Correct Answer: Option A — It promotes code reusability and allows the creation of a new class based on an existing class
Detailed Academic Explanation:
It promotes code reusability and allows the creation of a new class based on an existing class is the correct answer to “What is the benefit of using inheritance in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 11 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which principle of OOP emphasizes the bundling of data and methods that operate on the data into a single unit?
Correct Answer: Option A — Encapsulation
Detailed Academic Explanation:
Encapsulation is the correct answer to “Which principle of OOP emphasizes the bundling of data and methods that operate on the data into a single unit”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 12 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following best describes inheritance?
Correct Answer: Option A — Ability of a class to derive members of another class as a part of its own definition
Detailed Academic Explanation:
Ability of a class to derive members of another class as a part of its own definition is the correct answer to “Which of the following best describes inheritance”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 13 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following statements is wrong about inheritance?
Correct Answer: Option C — Private members of a class can be inherited and accessed
Detailed Academic Explanation:
Private members of a class can be inherited and accessed is the correct answer to “Which of the following statements is wrong about inheritance”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 14 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does built-in function help do in context of classes?
Correct Answer: Option C — Determines class description of any built-in type
Detailed Academic Explanation:
Determines class description of any built-in type is the correct answer to “What does built-in function help do in context of classes”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 15 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following statements isn't true?
Correct Answer: Option C — The value of a private variable in the superclass can be changed in the subclass
Detailed Academic Explanation:
The value of a private variable in the superclass can be changed in the subclass is the correct answer to “Which of the following statements isn't true”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 16 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is polymorphism in object-oriented programming?
Correct Answer: Option A — It allows objects of different classes to be treated as objects of the same class
Detailed Academic Explanation:
It allows objects of different classes to be treated as objects of the same class is the correct answer to “What is polymorphism in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 17 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the difference between a class and an object in object-oriented programming?
Correct Answer: Option A — A class is a blueprint for creating objects, while an object is an instance of a class
Detailed Academic Explanation:
A class is a blueprint for creating objects, while an object is an instance of a class is the correct answer to “What is the difference between a class and an object in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 18 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is a class variable in object-oriented programming?
Correct Answer: Option A — A variable shared among all instances of a class
Detailed Academic Explanation:
A variable shared among all instances of a class is the correct answer to “What is a class variable in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 19 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the biggest reason for the use of polymorphism?
Correct Answer: Option C — The program will have a more elegant design and will be easier to maintain and update
Detailed Academic Explanation:
The program will have a more elegant design and will be easier to maintain and update is the correct answer to “What is the biggest reason for the use of polymorphism”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 20 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the use of duck typing?
Correct Answer: Option C — Less restriction on the type values that can be passed to a given method
Detailed Academic Explanation:
Less restriction on the type values that can be passed to a given method is the correct answer to “What is the use of duck typing”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 21 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of the constructor (__init__ method) in a class in Python?
Correct Answer: Option A — It initializes the attributes of an object
Detailed Academic Explanation:
It initializes the attributes of an object is the correct answer to “What is the purpose of the constructor (__init__ method) in a class in Python”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 22 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following Python code? >>> class A: pass >>> class B(A): pass >>> obj=B() >>> isinstance(obj,A)
Correct Answer: Option A — True
Detailed Academic Explanation:
True is the correct answer to “What will be the output of the following Python code? >>> class A: pass >>> class B(A): pass >>> obj=B() >>> isinstance(obj,A)”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 23 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option B — 2
Detailed Academic Explanation:
2 is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 24 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of using abstraction in object-oriented programming?
Correct Answer: Option A — To hide complex implementation details and focus on the essential features
Detailed Academic Explanation:
To hide complex implementation details and focus on the essential features is the correct answer to “What is the purpose of using abstraction in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 25 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option A — 1 1 1
Detailed Academic Explanation:
1 1 1 is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 26 of 40
★ FPSC
★ PPSC
★ 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)
Correct Answer: Option C — The program runs fine and 1 is printed
Detailed Academic Explanation:
The program runs fine and 1 is printed is the correct answer to “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)”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 27 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
A class in which one or more methods are only implemented to raise an exception is called an abstract class.
Correct Answer: Option A — True
Detailed Academic Explanation:
True is the correct answer to “A class in which one or more methods are only implemented to raise an exception is called an abstract class.”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 28 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
How does inheritance promote code reusability in object-oriented programming?
Correct Answer: Option A — It allows a subclass to inherit attributes and methods from a parent class
Detailed Academic Explanation:
It allows a subclass to inherit attributes and methods from a parent class is the correct answer to “How does inheritance promote code reusability in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 29 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the main advantage of using abstraction in object-oriented programming?
Correct Answer: Option A — It hides complex implementation details and focuses on the essential features
Detailed Academic Explanation:
It hides complex implementation details and focuses on the essential features is the correct answer to “What is the main advantage of using abstraction in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 30 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which principle of OOP is related to creating new classes by extending existing classes?
Correct Answer: Option A — Inheritance
Detailed Academic Explanation:
Inheritance is the correct answer to “Which principle of OOP is related to creating new classes by extending existing classes”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 31 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option A — test of B called test of C called test of A called
Detailed Academic Explanation:
test of B called test of C called test of A called is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 32 of 40
★ FPSC
★ PPSC
★ 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())
Correct Answer: Option B — A B
Detailed Academic Explanation:
A B is the correct answer to “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())”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 33 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What type of inheritance is illustrated in the following Python code? class A(): pass class B(): pass class C(A,B): pass
Correct Answer: Option B — Multiple inheritance
Detailed Academic Explanation:
Multiple inheritance is the correct answer to “What type of inheritance is illustrated in the following Python code? class A(): pass class B(): pass class C(A,B): pass”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 34 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option C — 5
Detailed Academic Explanation:
5 is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 35 of 40
★ FPSC
★ PPSC
★ 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)
Correct Answer: Option B — Error because the member shape is a protected member
Detailed Academic Explanation:
Error because the member shape is a protected member is the correct answer to “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)”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 36 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option D — Error, private class member can't be accessed in a subclass
Detailed Academic Explanation:
Error, private class member can't be accessed in a subclass is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 37 of 40
★ FPSC
★ PPSC
★ 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()
Correct Answer: Option B — 3 1
Detailed Academic Explanation:
3 1 is the correct answer to “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()”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 38 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is the most suitable definition for encapsulation?
Correct Answer: Option B — Means of bundling instance variables and methods in order to restrict access to certain class members
Detailed Academic Explanation:
Means of bundling instance variables and methods in order to restrict access to certain class members is the correct answer to “Which of the following is the most suitable definition for encapsulation”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 39 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of the super() function in object-oriented programming?
Correct Answer: Option A — It is used to call a method from the parent class
Detailed Academic Explanation:
It is used to call a method from the parent class is the correct answer to “What is the purpose of the super() function in object-oriented programming”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
Question 40 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The purpose of name mangling is to avoid unintentional access of private class members.
Correct Answer: Option A — True
Detailed Academic Explanation:
True is the correct answer to “The purpose of name mangling is to avoid unintentional access of private class members.”. This question is standard in competitive examination syllabi for Concept Of Object Oriented Programs In Python.
💡Key Conceptual Anchor:Concept Of Object Oriented Programs In Python
✓Link copied to clipboard
Continue Your Practice
Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡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.