Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Uhunoma Osula](https://secure.gravatar.com/avatar/1b6a54bd4fb10ced3686ed2091bce296?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Uhunoma Osula
6,414 PointsHow does this make sense
I did 5.6*0.1 which is 0.56 the console answered 0.5599999999999999 I am so confused
2 Answers
![Simon Voort](https://secure.gravatar.com/avatar/4cebc694fd539738d0379e5a929568b4?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Simon Voort
5,682 PointsComputers use binary code, which means they store numbers (and other things) as sequences of 1’s and 0’s. When you write code, it is converted into binary code when your program runs. However, some numbers cannot be exactly represented in binary code, so the computer has to use the closest number it can store. This can happen with floats/decimals. The operands you use are floats and some floats are not exact in binary, so Python uses a slightly different number close to the numbers you gave. It performs the multiplication with those numbers and then rounds the result to the closest number it can store in binary code, in this case .5599999999999999.
To get the answer you expected, you can use the round function, which takes two arguments: the number you want to round, and the number of decimals. For example:
round(5.6*.1, 2) # result: .56
![Uhunoma Osula](https://secure.gravatar.com/avatar/1b6a54bd4fb10ced3686ed2091bce296?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Uhunoma Osula
6,414 PointsThan you that made so much sense