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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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: C 🗳️
Reference:
https://www.python-course.eu/python3_inheritance.php

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
seaverick
1 month, 4 weeks 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, 3 months ago
Selected Answer: D
Superclasses may be called ancestors, but there is no such property. Answer is D
upvoted 3 times
...
Baldridge
1 year, 10 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
666_m
1 year, 10 months ago
D is correct
upvoted 3 times
...
macxsz
1 year, 11 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 ...