BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Python Institute Exam PCAP-31-03 Topic 1 Question 29 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 29
Topic #: 1
[All PCAP-31-03 Questions]

Assuming that the code below has been placed inside a file named code.py and executed successfully which of the following expressions evaluate to True? (Select two answers)

Show Suggested Answer Hide Answer
Suggested Answer: B, D

Contribute your Thoughts:

Jennifer Burke
2 years ago
Correct is BD ClassA.__module__ == '__main__' returns True, B. snippet has a typo.
upvoted 1 times
...
Jennifer Burke
2 years ago
C is incorrect! False __name__ == '__main__' returns True. D is probably correct if the rest of the code snippet is included. len(ClassB.__bases__) == 2 returns False.
upvoted 1 times
...

Save Cancel