Python math.log10() နည်းလမ်း
ဥပမာ
မတူညီသောဂဏန်းများ၏ အခြေခံ-10 လော့ဂရစ်သမ်ကို ရှာပါ။
# Import math Library
import math
# Return the base-10 logarithm
of different numbers
print(math.log10(2.7183))
print(math.log10(2))
print(math.log10(1))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
math.log10()
နည်းလမ်းသည် ဂဏန်းတစ်ခု၏ အခြေခံ-10 လော့ဂရစ်သမ်ကို ပြန်ပေးသည် ။
အထားအသို
math.log10(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ဂဏန်း float တစ်ခု၏ အခြေခံ-10 လော့ဂရစ်သမ်ကို ကိုယ်စားပြုသော တန်ဖိုး |
---|---|
Python ဗားရှင်း- | ၂.၃ |