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 103 discussion

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

A property that stores information about a given class's super-classes is named:

  • A. __upper__
  • B. __super__
  • C. __ancestors__
  • D. __bases__
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
seaverick
10 months ago
Selected Answer: D
http://www.java2s.com/example/python-book/class-bases-attribute.html class rec: pass # Empty namespace object rec.name = 'Bob' # Just objects with attributes rec.age = 40 # ww w . ja v a2 s.c o m d = rec.__bases__ # Class to superclasses link, () in 2.X #d = rec.__ancestors__ #AttributeError: type object 'rec' has no attribute '__ancestors__' #d = rec.__super__ #AttributeError: type object 'rec' has no attribute '__super__' #d = rec.__upper__ #AttributeError: type object 'rec' has no attribute '__upper__' print( d ) ans D
upvoted 1 times
...
Mallie
1 year, 11 months ago
Selected Answer: D
Superclasses may be called ancestors, but there is no such property. Answer is D
upvoted 3 times
...
Baldridge
2 years, 6 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
666_m
2 years, 6 months ago
D is correct
upvoted 3 times
...
macxsz
2 years, 7 months ago
D. __bases__ __ancestors__ does not exist
upvoted 4 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 ...