Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 26

What is the expected output of the following snippet?

    Correct Answer: B

    The output 'True upper' is expected. The 'Lower' class inherits from 'Upper', and its constructor calls the constructor of the 'Upper' class using 'super().__init__()', thus initializing 'self.property' to 'upper'. 'isinstance(Object, Lower)' checks if 'Object' is an instance of 'Lower' and returns 'True'. Therefore, the output is 'True upper'.

Discussion
DKAT2023Option: B

B is correct

Dave304409Option: B

is correct