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

PCAP-31-03 Exam - Question 21


Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Choose two.)

Show Answer
Correct Answer: AD

Option A is correct because 'var' is a class attribute and it is present in Class.__dict__. Option D is also correct because 'data' is another name for 'var' and class attributes are stored in the class's __dict__, so 'data' will be present in Class.__dict__. Option B is incorrect because 'data' is not an attribute of the object instance. Option C is incorrect because Class.__dict__ contains more than one key-value pair, including special methods and attributes.

Discussion

2 comments
Sign in to comment
DKAT2023Options: AD
Jun 29, 2024

A and D are corrects

Dave304409Options: AD
Jul 4, 2024

is correct