Python math.remainder() နည်းလမ်း
ဥပမာ
x ၏ အကြွင်းကို y နှင့်စပ်လျဉ်း၍ ပြန်ပေးပါ။
# Import math Library
import math
# Return the remainder of x/y
print (math.remainder(9, 2))
print (math.remainder(9,
3))
print
(math.remainder(18, 4))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်းသည် x ၏အ math.remainder()
ကြွင်းကို y နှင့်စပ်လျဉ်း၍ ပြန်ပေးသည်။
အထားအသို
math.remainder(x, y)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. The number you want to divide. |
y | Required. The number you want to divide with. It must be a non-zero number, or a ValueError occurs. |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | float အကြွင်းကို ကိုယ်စားပြုသော တန်ဖိုး တစ်ခု |
---|---|
Python ဗားရှင်း- | ၃.၇ |
နောက်ထပ် ဥပမာများ
ဥပမာ
x/y အကြွင်းကို ပြန်ပေးပါ။
print (math.remainder(23.5, 5))
print
(math.remainder(23, 5.5))
print (math.remainder(12.5, 2.5))
print
(math.remainder(12, 2))