← Quiz: Inheritance, ABC and MRO: all 10 questions
Quiz: Inheritance, ABC and MRO · Question 1 of 10
What happens when you try to create an object of a class that still has an unimplemented abstract method?
What happens when you try to create an object of a class that still has an unimplemented abstract method?
- A.The object is created, and calling the method returns None
- B.A NotImplementedError is raised when the method is called
- C.A TypeError is raised when the object is created
- D.Python silently adds an empty method
Answer & explanation
Correct answer: A TypeError is raised when the object is created
Python refuses to create the object, so the mistake is caught early.
Can you get the rest right without peeking?
Take the timed Quiz: Inheritance, ABC and MRO quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →