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

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

The __bases__ property contains:

  • A. base class location (addr)
  • B. base class objects (class)
  • C. base class names (str)
  • D. base class ids (int)
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Reference:
https://www.honeybadger.io/blog/python-instantiation-metaclass/#:~:text=Python%20provides%20a%20__bases,that%20the%20given%20class%
20inherits.&text=The%20above%20output%20shows%20that,object%20as%20a%20base%20class

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
langolier42
1 month ago
Selected Answer: C
__bases__ shows base classes of classes, not objects. If try to do it with an object, it fails: class A: pass class B(A): pass obj = B() print(obj.__bases__) output: AttributeError: 'B' object has no attribute '__bases__'
upvoted 1 times
...
Damon54
9 months, 2 weeks ago
base class objects (class) is correct ( more accurate )
upvoted 1 times
...
seaverick
10 months ago
Selected Answer: C
class A: pass class B(A): pass print(B.__bases__) #output (<class '__main__.A'>,) Ans is C
upvoted 2 times
...
angelika_az
2 years, 5 months ago
Selected Answer: B
B correct
upvoted 2 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 ...