Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.
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? (Choose two.)
Ans A,as len(ClassB.__bases__) =1,after compiled ,it show '1'.
Ans B, as ClassA.__module__ == '__main__', after compiled, it return true.
Ans C, __name__ = __main__, so __name__ != 'code.py', return is false.
Ans D, (str(Object) == 'Object',after compiled , it show 'TypeError'
Correction: if you add a comma at the front and the end of the "Object" word, after compiled, it will return true
print(str('Object') == 'Object') # Ans D, return true
Only B is correct Answer!!
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.
dicksonpwc
1 year agoDamon54
2 months, 2 weeks agoandr3
1 year, 1 month agocarpmatias
1 year, 11 months agomacxsz
1 year, 11 months agoNoarmy315
2 years, 3 months agoluckymuki
2 years, 6 months ago