Q1. What is OOP?
Anonymous Quiz
3%
Out-of-Order Processing
92%
Object-Oriented Programming
2%
Out-of-Place Programming
3%
Optimized Object Parsing
Q2. What is an object in OOP?
Anonymous Quiz
11%
A variable
7%
A block of code
74%
An instance of a class
9%
A built-in function
Q3. Which of the following is NOT a basic principle of OOP?
Anonymous Quiz
5%
Encapsulation
7%
Inheritance
7%
Polymorphism
80%
Concatenation
Q4. What is inheritance in OOP?
Anonymous Quiz
79%
The ability to create new classes from existing ones
13%
The ability to access private members of a class
0%
The ability to create objects
9%
The ability to override methods
Q5. Which keyword is used to inherit a class in Python?
Anonymous Quiz
35%
extends
20%
inherit
17%
superclass
28%
class
👍2👎2
Q6. What is encapsulation in OOP?
Anonymous Quiz
79%
Hiding the implementation details of an object
5%
Making an object public
16%
Exposing private data of an object
0%
Limiting the number of objects
Q7. Which access specifier in Python indicates that an attribute should not be accessed directly from outside the class?
Anonymous Quiz
11%
public
77%
private
9%
protected
4%
hidden
Q9. Which OOP principle allows methods in a subclass to have the same name as methods in its superclass, but with different implementations?
Anonymous Quiz
13%
Inheritance
60%
Polymorphism
18%
Encapsulation
9%
Abstraction
Q10. What is the process of defining a new class based on an existing class called?
Anonymous Quiz
5%
Polymorphism
71%
Inheritance
16%
Abstraction
7%
Encapsulation
Q11. What is a superclass in inheritance?
Anonymous Quiz
39%
A class that does not have any parent class
37%
A class from which other classes inherit
20%
A class that can inherit from multiple classes
3%
A class with private attributes only
Q12. What is a subclass in inheritance?
Anonymous Quiz
32%
A class that does not have any child class
39%
A class that has a parent class
3%
A class that cannot have private attributes
25%
A class that can inherit from multiple classes
👎4👍1
Q13. Which of the following is true about the super () function in Python?
Anonymous Quiz
72%
It calls the superclasss constructor
16%
It calls the subclasss constructor
3%
It is used to create a new object
9%
It is used to access private members
Q15. What is an abstract class in Python?
Anonymous Quiz
63%
A class that cannot be instantiated
25%
A class with only private methods
3%
A class with only public methods
8%
A class with no methods
Q16. How do you define an abstract class in Python?
Anonymous Quiz
9%
By using the abstract keyword
7%
By using the abstract class statement
84%
By importing the abc module and using@abstractmethod decorator
0%
By using the virtual keyword
Q17. What is an interface in Python?
Anonymous Quiz
10%
A class that cannot be inherited
72%
A blueprint of a class without any implementation
7%
A class with only private methods
11%
A class with only public methods
Q18. Which OOP principle allows a class to have multiple methods with the same name but different parameters?
Anonymous Quiz
11%
Inheritance
75%
Polymorphism
10%
Encapsulation
3%
Abstraction
Q20. What is the purpose of the init method in Python classes?
Anonymous Quiz
16%
To define private attributes
8%
To define public attributes
76%
To initialize object state
0%
To delete an object
Q21. Which keyword is used to define a method in a Python class?
Anonymous Quiz
14%
method
75%
def
2%
define
9%
function