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

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

A function called issubclass (c1, c2) is able to check if:

  • A. c1 and c2 are both subclasses of the same superclass
  • B. c2 is a subclass of c1
  • C. c1 is a subclass of c2
  • D. c1 and c2 are not subclasses of the same superclass
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Reference:
https://www.oreilly.com/library/view/python-in-a/9781491913833/ch04.html

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
freshdevofdevair
1 year, 7 months ago
The issubclass() function checks if the c1 argument (first argument) is a subclass of c2 class (second argument). The issubclass() function takes two parameters: class to be checked and class, type or tuple of classes and types. The fuction returns true if the first argument (c1) is a subclass of a class, or any element of the tuple. If not, it returns false.
upvoted 1 times
...
Jajalmao
2 years, 4 months ago
This question is not very clear~ it is really based on the content of the function~ what if c2 is a subclass of c1? c1 and c2 are just the arguments, this information could not tell which one is sub class~ so I would say B and C
upvoted 1 times
...
macxsz
2 years, 7 months ago
Selected Answer: C
C. c1 is a subclass of c2
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 ...