🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Encapsulation and Abstraction: all 10 questions

Quiz: Encapsulation and Abstraction · Question 4 of 10

In Python, what happens when you try to create an object of a class with an @abstractmethod that isn't implemented?

In Python, what happens when you try to create an object of a class with an @abstractmethod that isn't implemented?

  1. A.It works normally
  2. B.TypeError
  3. C.It returns None
  4. D.SyntaxError
Answer & explanation

Correct answer: TypeError

Abstract classes can't be instantiated until all abstract methods are implemented.

Can you get the rest right without peeking?

Take the timed Quiz: Encapsulation and Abstraction quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →