You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The question is worded as intended. The fact that floating point numbers don't give exact results is mentioned a few places. However, the fact that you get a slightly "off" answer here would be a discussion point in a live-taught course. One could also point people at the decimal built-in module.
Hello! I am learning Python. I appreciate that you shared your course materials, thank you!
What does the decimal built-in module have to do with this mortgage exercise, please? Is that covered later in the course? Is there a way to get the .6 answer using the decimal module?
Floating point point numbers are not exact. If this matters to you, consider the use of the decimal module (you'd need to look at the library documentation for more information).
Enter this program and run it. I get an answer of 966279.5999999957. Not 966,279.6.
I can get an anwer of 966,279.6 by following:
The text was updated successfully, but these errors were encountered: