PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 26


What is the expected output of the following snippet?

Show Answer
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

2 comments
Sign in to comment
DKAT2023Option: B
Jun 29, 2024

B is correct

Dave304409Option: B
Jul 5, 2024

is correct