Deal of The Day! 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 88 Discussion

Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 88
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:

Karan
13 days ago
I believe option D) len(ClassB.__bases__) == 1 is also True, as it checks the number of base classes for ClassB.
upvoted 0 times
...
Ciara
22 days ago
B) _name == _main_ is the correct answer. The `__name__` variable is set to `'__main__'` when the script is executed directly, and to the module name when it's imported.
upvoted 0 times
...
Barabara
22 days ago
I agree with Miss, option A) makes sense because it's comparing a string representation of an object.
upvoted 0 times
...
Miss
1 months ago
I think option A) str(Object) == 'Object' is True.
upvoted 0 times
...

Save Cancel