🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.The object is created, and calling the method returns None
  2. B.A NotImplementedError is raised when the method is called
  3. C.A TypeError is raised when the object is created
  4. 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 →