math module ၏ ceil method
math module ၏ method ceil သည်
ကိန်းကို အမြဲတမ်း အပေါ်သို့ လိုက်၍ ရှေ့နောက်ပြုစေပါသည်။
ဖွဲ့စည်းပုံ
pythonimport math
math.ceil(ကိန်း)
ဥပမာ
ကိန်း 25.38 ကို အပေါ်သို့ လိုက်၍ ရှေ့နောက်ပြုကြည့်ရအောင်။
pythonimport math
print(math.ceil(25.38))
ကုဒ် run ပြီးရလာတဲ့ ရလဒ်။
python26
ဥပမာ
အခု method ceil ကို ကိန်း
-4.88 မှာ အသုံးပြုကြည့်မယ်။
pythonimport math
print(math.ceil(-5.25))
ကုဒ် run ပြီးရလာတဲ့ ရလဒ်။
python-5