A,D:
x = 'x'
print(chr(ord(x)) == x) #True
print(ord(ord(x)) == x) # it will generate TypeError
print(chr(chr(x)) == x) # it will generate TypeError
print(ord(chr(x)) == x) # it will generate TypeError
#Example2
x = 1
print(chr(ord(x)) == x) # it will generate TypeError
print(ord(ord(x)) == x) # it will generate TypeError
print(chr(chr(x)) == x) # it will generate TypeError
print(ord(chr(x)) == x) #True
A D is what they intend, but the question should then read "which of these options could EVER be True, but never simulataneously" (which isn't a great question)
I hate this question becuase the answer depends on what the variable x is. ord() expects a character and returns an int. chr() expects and int and returns a character.
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.
lukaki
Highly Voted 3 years agobaimus
1 year, 7 months agoTheFivePips
Most Recent 11 months, 3 weeks agopalagus
2 years, 6 months agomacxsz
2 years, 7 months agorbishun
3 years agorbishun
3 years ago