Object-Oriented Programming Flashcards
6 cards from real PCAP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Object-Oriented Programming flashcards as text
What does the `super()` function do in Python?
Answer: Calls a method from the parent class
`super()` returns a proxy object that delegates method calls to the parent class.
What is method overriding in Python OOP?
Answer: Defining a method with the same name in a subclass
Method overriding means redefining a parent class method in a child class with the same name.
Which of the following correctly defines a subclass `Dog` inheriting from `Animal`?
Answer: class Dog(Animal):
Python uses parentheses after the class name to specify the parent class for inheritance.
What is polymorphism in Python?
Answer: Multiple classes responding to the same interface
Polymorphism allows different classes to be used through the same interface by implementing the same methods.
How do you define a class variable (shared by all instances) in Python?
Answer: Declare it outside any method, inside the class body
Class variables are defined in the class body outside any method and are shared by all instances.
What will `isinstance(obj, MyClass)` return if `obj` is an instance of a subclass of `MyClass`?
Answer: True
`isinstance()` returns `True` if the object is an instance of the class or any of its subclasses.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- pythoninstitute.org — Eligibility, fees, retake fee, retake policy, score release, time limit, score validity · verified Nov 2026
- home.pearsonvue.com — Test delivery · verified Nov 2026