exam questions

Exam PCAP-31-03 All Questions

View all questions & answers for the PCAP-31-03 exam

Exam PCAP-31-03 topic 1 question 56 discussion

Actual exam question from Python Institute's PCAP-31-03
Question #: 56
Topic #: 1
[All PCAP-31-03 Questions]

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

  • A. len(Object.__dict__) == 2
  • B. 'var' in Object.__dict__
  • C. 'var' in Class.__dict__
  • D. 'data' in Object.__dict__
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Abbribas
1 month, 2 weeks ago
Selected Answer: AB
A. True (Object.__dict__ contains 'prop' and 'var', so its length is 2). B. True ('var' is created as an instance variable and is in Object.__dict__). C. False ('var' is an instance variable, not a class variable in Class.__dict__). D. False ('data' is a class variable, so it's in Class.__dict__, not Object.__dict__).
upvoted 1 times
...
Dave304409
1 year ago
Selected Answer: AB
is correct, testing in IDE
upvoted 2 times
...
eskimolight
1 year ago
To me it looks like the answer is A & B
upvoted 1 times
...
kstr
1 year, 1 month ago
Only A is True
upvoted 1 times
...
DKAT2023
1 year, 1 month ago
something wrong in the question
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...