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-modulen

Metoden ceil i math-modulen utfører alltid avrunding av tall oppover til nærmeste hele tall.

Syntaks

import math math.ceil(tall)

Eksempel

La oss runde tallet 25.38 oppover:

import math print(math.ceil(25.38))

Resultat av kjøring:

26

Eksempel

La oss nå bruke metoden ceil på tallet -4.88:

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

Resultat av kjøring:

-5

Se også

  • funksjonen round,
    som avrunder tall
  • metoden floor i math-modulen,
    som utfører avrunding av tall nedover
Norsk
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEnglishEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
Vi bruker informasjonskapsler for nettstedets funksjonalitet, analyse og personalisering. Behandling av data foregår i henhold til Personvernerklæringen.
godta alle tilpass avvis