Watch time just short of 0.8

Predict the output · Medium · §5.4 Floats are approximations

You watched two videos, for 0.7 hours and 0.1 hours. The code asks whether you reached the goal of 0.8 hours. In Python, the value of 0.7 + 0.1 is 0.7999999999999999. Predict the output without running the code.

Code

hours = 0.7 + 0.1
print(hours >= 0.8)
print(round(hours, 2) >= 0.8)
print(abs(hours - 0.8) < 0.001)

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.