What is the binary number 1010.0101 in decimal?
What is the decimal number 14.5625 in binary?
For each of the following numbers specify whether it can be represented exactly with a Python float value:
a.
1/3
b.
1/4
c.
10.0 ** 10
d.
10.0 ** 10 ** 10
e.
1234567890.0e100
f.
123456789012345678.0
Write a Python program that prints 0.1 and decimal.Decimal(0.1)
.
Write a Python program that prints the result of summing 0.1 ten times.
Write a Python program that prints the result of the comparison 0.3 == 0.1 + 0.2
.
Write a Python program that uses the built-in round
function to print the result of rounding 2. 675 to two decimal places.