...

/

Puzzle 9: Explanation

Puzzle 9: Explanation

Let’s find out how floating-point arithmetic works in Python.

We'll cover the following...

Try it yourself

Try executing the code below to verify the result:

Press + to interact
print(1.1 * 1.1)

Explanation

You might have expected the correct answer to be 1.21, which is the correct answer mathematically. When seeing this or similar output, some new developers go to the ...

Access this course and 1400+ top-rated courses and projects.