Q37
What will be the output of the following Python function? ord(65) ord(‘A’)
A.
A
65
65
B.
Error
65
Answer65
C.
A
Error
Error
D.
Error
Error
Error
Answer: Option B
Solution
Answer: Option B
Solution:
Option B: Error65
When the argument '65' is passed to the ord() function, it's treated as an integer and not a valid Unicode character. Therefore, the function will not raise an error. Instead, it will return the Unicode code point of the character corresponding to the integer 65, which is 'A'.
Hence, the correct answer is indeed
Option B: Error
65.