Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
What is abstraction in OOP?
Which module in Python provides support for abstract classes?
What is the purpose of an abstract class?
What will happen if you try to instantiate an abstract class?
How do you mark a method as abstract in Python?
What will this code output?
Can an abstract class contain concrete (fully defined) methods?
What is the purpose of the ABC class?
What must a subclass do if it inherits from an abstract class?
What is the output of this code?
What is abstraction in OOP?
Which module in Python provides support for abstract classes?
What is the purpose of an abstract class?
What will happen if you try to instantiate an abstract class?
How do you mark a method as abstract in Python?
What will this code output?
from abc import ABC, abstractmethod class A(ABC): @abstractmethod def display(self): pass
Can an abstract class contain concrete (fully defined) methods?
What is the purpose of the ABC class?
What must a subclass do if it inherits from an abstract class?
What is the output of this code?
from abc import ABC, abstractmethod class A(ABC): @abstractmethod def show(self): pass class B(A): def show(self): print("Class B") obj = B() obj.show()