Certified Associate in Python Programming (PCAP) — Question 51
Which of the equations are True? (Choose two.)
Answer options
- A. chr (ord (x)) = = x
- B. ord (ord (x)) = = x
- C. chr (chr (x)) = = x
- D. ord (chr (x)) = = x
Correct answer: A
Explanation
The equation A, chr (ord (x)) == x, is true because it converts a character to its Unicode code point and then back to the character, resulting in the original character. The other options do not hold true as they either involve invalid operations or do not return the original value.