-3

https://i.stack.imgur.com/4AwjX.png

Its adding in 1 at the end of that console log output. Why? Answer is suppose to be only 13.37

Uros Tadic
  • 55
  • 1
  • 1
  • 8

1 Answers1

1

Likely because it is adding to numbers of type double (I am not a huge Python expert though, so I could be wrong). The doubletype, much like single does not have perfect precission. Hence some decimal errors can occur...

Jakob Busk Sørensen
  • 5,599
  • 7
  • 44
  • 96