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, 7 months agoDamon54
9 months, 3 weeks agoandr3
1 year, 8 months agocarpmatias
2 years, 6 months agomacxsz
2 years, 6 months agoNoarmy315
2 years, 11 months agoluckymuki
3 years, 1 month ago