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

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

    Correct Answer: A, D

    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
Dave304409Options: AD

is correct

DKAT2023Options: AD

A and D are corrects