+ 2
How do I use round function with...
I am asking is there easier ways to use round function to return a number with more desimals? for now I could make round function to return for accuracy for example of 2 desimals: print((round((10/3)*100))/100) >>>3.33
1 Réponse
+ 3
It is always a good idea to look at stackoverflow for questions like this, I found this:
a = 13.949999999999999
format(a, '.2f')
print(a)
I found it here: https://stackoverflow.com/questions/455612/limiting-floats-to-two-decimal-points?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa