Q.

What is the value of the following Python expression? bin(0x8)

A. ‘0bx1000’
B. 8
C. 1000
D. ‘0b1000’
Answer» D. ‘0b1000’
Explanation: the prefix 0x specifies that the value is hexadecimal in nature. when we convert this hexadecimal value to binary form, we get the result as: ‘0b1000’.
3.3k
0
Do you find this helpful?
25

Discussion

No comments yet