?
What will be the output of the following Python function?
What will be the output of the following Python function?
ord(65)
ord(‘A’)
ord(65)
ord(‘A’)
Answer & Solution
Correct Answer:
Option
B
Option B: Error
65
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.
65
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.
Join the Discussion
Login to post a comment or share your explanation.
Login