What is the value of x if x = math.ldexp(0.5, 1)?
A. 1
B. 2.0
C. 0.5
D. none of the mentioned
Answer:A
What is the value of x if x = math.ldexp(0.5, 1)?
A. 1 B. 2.0 C. 0.5 D. none of the mentioned
Explanation: The value returned by ldexp(x, y) is x * (2 ** y). In the current case x is 1.0.