wie um eine float-Zahl auf die nächste Ganzzahl in Python

Die Funktion round(x) in Python Erträge floating-Nummer. Also, was ist die am besten geeignete code in Python eine Runde schwimmen, um die nächsten Nachbarn?

  • benachbarte ganze Zahl? int(round(x))
  • Ich denke du meinst int(round(x)) keine?
  • Du hast Recht.
InformationsquelleAutor fsaizpoy | 2015-12-16
Schreibe einen Kommentar