Python math.sin() နည်းလမ်း
ဥပမာ
မတူညီသောနံပါတ်များ၏ sine ကိုရှာပါ
# Import math Library
import math
# Return the sine of different
values
print (math.sin(0.00))
print (math.sin(-1.23))
print (math.sin(10))
print (math.sin(math.pi))
print
(math.sin(math.pi/2))
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
math.sin()
နည်းလမ်းသည် ကိန်းတစ်ခု၏ sine ကို ပြန်ပေးသည် ။
မှတ်ချက်- ဒီဂရီ၏ sine ကို ရှာရန်၊ ၎င်းကို နည်းလမ်းဖြင့် ပထမဦးစွာ radian အဖြစ် ပြောင်းလဲရမည် (ဥပမာ အောက်တွင် ကြည့်ပါ)။
math.radians()
အထားအသို
math.sin(x)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
x | Required. The number to find the sine of. If the value is not a number, it returns a TypeError |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | တန်ဖိုးသည် -1 မှ float 1 သည် ထောင့်တစ်ခု၏ sine ကိုကိုယ်စားပြုသည်။ |
---|---|
Python ဗားရှင်း- | ၁.၄ |
နောက်ထပ် ဥပမာများ
ဥပမာ
မတူညီသောဒီဂရီများ၏ sine ကိုရှာပါ
# Import math Library
import math
# Return the sine value of 30
degrees
print(math.sin(math.radians(30)))
# Return the sine value
of 90 degrees
print(math.sin(math.radians(90)))