Programming Examples
Write a Python code to calculate and display the value of Sine 45° and Cosine 30°
Write a Python code to calculate and display the value of Sine 45° and Cosine 30°
import math
a=45;b=60
x = 22/(7*180)*a
y = 22/ (7*180)*b
sn= math.sin(x)
cs= math.cos(y)
print("The value of Sine 45 degree =",sn)
print("The value of Cosine 60 degree =",cs)
Output/ Explanation:
The value of Sine 45 degree = 0.7073302780849811
The value of Cosine 60 degree = 0.4996349289865546