Puzzle 9: Explanation
Let’s find out how floating-point arithmetic works in Python.
We'll cover the following...
We'll cover the following...
Try it yourself
Try executing the code below to verify the result:
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 message boards and say, “We found a bug in Python!” The ...