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.
This section is not available anymore. Please use the main Exam Page.PCAP Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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, 5 months agobaimus
1 year, 11 months agoDave304409
Most Recent 1 week, 1 day agoTheFivePips
1 year, 4 months agopalagus
2 years, 11 months agomacxsz
2 years, 11 months agorbishun
3 years, 5 months agorbishun
3 years, 5 months ago