Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

What is the value of the following Python expression?
bin(0x8)
a) ‘0bx1000’
b) 8
c) 1000
d) ‘0b1000’

Answer: d
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’.

Join The Discussion