+ 3
why (round (2.675,2))=2.67?
print (round(1.5)) #2 print (round (2.665)) #3 print (round (2.665,2)) #2.67 print (round (2.675,2)) #2.67(why not 2.68?)
1 Respuesta
+ 1
It's not an error. Check the python docs:
https://docs.python.org/3/library/functions.html#round
Also compare to numpy.round():
https://code.sololearn.com/cEzK1wGDSAXW/?ref=app