Python math.sqrt() နည်းလမ်း
ဥပမာ
မတူညီသော ဂဏန်းများ၏ နှစ်ထပ်ကိန်းကို ရှာပါ
# Import math Library
import math
# Return the square root of
different numbers
print (math.sqrt(9))
print (math.sqrt(25))
print
(math.sqrt(16))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
နည်းလမ်းသည် ကိန်း တစ်ခု၏ math.sqrt()
နှစ်ထပ်ကိန်းကို ပြန်ပေးသည်။
မှတ်ချက်- နံပါတ်သည် 0 ထက်ကြီးသော သို့မဟုတ် ညီရပါမည်။
အထားအသို
math.sqrt(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. A number to find the square root of. If the number is less than 0, it returns a ValueError. If the value is not a number, it returns a TypeError |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | တန်ဖိုး တစ်ခု float ၊ ဂဏန်းတစ်ခု၏ နှစ်ထပ်ကိန်းကို ကိုယ်စားပြုသည်။ |
---|---|
Python ဗားရှင်း- | ၁.၄ |