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

The value of Sine 45 degree = 0.7073302780849811

The value of Cosine 60 degree = 0.4996349289865546

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad