PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 68


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

Show Answer
Correct Answer: C

The function issubclass(c1, c2) checks if the class c1 is a subclass of the class c2. This function takes two parameters: the class to be checked and the class, type, or tuple of classes and types to be checked against. It returns true if the first argument (c1) is a subclass of the second argument (c2) and false otherwise.

Discussion

3 comments
Sign in to comment
macxszOption: C
May 3, 2022

C. c1 is a subclass of c2

Jajalmao
Jul 8, 2022

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

freshdevofdevairOption: C
Apr 22, 2023

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.