Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 126 discussion

Actual exam question from Python Institute's PCAP
Question #: 126
Topic #: 1
[All PCAP Questions]

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

  • A. 'var' in Class.__dict__
  • B. 'var' in Object.__dict__
  • C. len(Object.__dict__) == 1
  • D. 'prop' in Class.__dict__
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
macxsz
Highly Voted 2 years, 6 months ago
Selected Answer: AC
A. 'var' in Class.__dict__ C. len(Object.__dict__) == 1
upvoted 5 times
...
seaverick
Most Recent 10 months ago
Selected Answer: AC
class Class: var=1 def __init__(self,value): self.prop=value Object=Class(2) print('var' in Object.__dict__) print('prop' in Class.__dict__) print('var' in Class.__dict__) print(len(Object.__dict__)==1) print(Class.__dict__) print(Object.__dict__) AC
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 ...