Hi everyone! I'm the author of code.mu :)
I'd love to chat with my non-Russian audience. I'm looking for your feedback on the site and the translation quality. Let's chat:)
50 of 151 menu

Metoden ceil i math-modulet

Metoden ceil i modulet math udfører afrunding af tal til heltal altid opad.

Syntaks

import math math.ceil(tal)

Eksempel

Lad os afrunde tallet 25.38 opad:

import math print(math.ceil(25.38))

Resultat af kodekørsel:

26

Eksempel

Lad os nu anvende metoden ceil på tallet -4.88:

import math print(math.ceil(-5.25))

Resultat af kodekørsel:

-5

Se også

  • funktionen round,
    som afrunder et tal
  • metoden floor i modulet math,
    som udfører afrunding af tal nedad
Dansk
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDeutschΕλληνικάEnglishEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
Vi bruger cookies til webstedets funktion, analyse og personalisering. Behandling af data foregår i henhold til Fortrolighedspolitikken.
accepter alle tilpas afvis