Rund auf 2 Dezimaler in PythonPython

Python-Programme
Anonymous
 Rund auf 2 Dezimaler in Python

Post by Anonymous »

Ich muss abrunden und es sollte zwei Dezimalstellen sein.a = 28.266
print round(a, 2)
< /code>


28.27 < /p>
< /blockquote>

Aber der erwartete Wert beträgt nur 28.26. < /p>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post