QuestionQ104

Object-Oriented Programming

What output is expected from the following code snippet?

Question Image

  • A False lower
  • B True upper
  • C True lower
  • D False upper
Explanation

A Lower instance is also an instance of its base class, Upper, so isinstance(Object, Upper) returns True. The subclass overrides method, so calling it returns lower.

Community Discussion

No comments yet. Be the first to start the discussion!