طريقة بايثون math.cos ()
مثال
أوجد جيب التمام لأرقام مختلفة:
# Import math Library
import math
# Return the cosine of
different numbers
print (math.cos(0.00))
print (math.cos(-1.23))
print (math.cos(10))
print (math.cos(3.14159265359))
التعريف والاستخدام
تُرجع math.cos()
الطريقة جيب التمام لرقم.
بناء الجملة
math.cos(x)
قيمه المعامل
Parameter | Description |
---|---|
x | Required. A number to find the cosine of. If the value is not a number, it returns a TypeError |
تفاصيل تقنية
قيمة الإرجاع: | قيمة float ، من -1 إلى 1 ، تمثل جيب التمام لزاوية |
---|---|
نسخة بايثون: | 1.4 |