What is the output of the following line of code typed into a Python interactive session?
>>> print (int(`1111`,2))
What is the output of the following line of code typed into a Python interactive session?
>>> print (int(`1111`,2))
The code `print(int('1111', 2))` converts the binary string '1111' to its decimal equivalent. In binary, '1111' represents 1*(2^3) + 1*(2^2) + 1*(2^1) + 1*(2^0), which equals 8 + 4 + 2 + 1 = 15. Therefore, the output is 15.
1*2**3 + 1*2**2 + 1*2**1 + 1*2**0 = 15