#Program to calculate the trigonometric calculations
import math
print('Program to calculate the formula based trigonometric questions such as tan(A-B)')
a=float(input('Please enter A of formula'))
b=float(input('Please enter B of formula'))
c=(22/(7*180))*a #as pie=22/7
d=(22/(7*180))*b
tana=math.tan(c)
tanb=math.tan(d)
print('The value of tanA is :',tana)
print('The value of tanB is ',tanb)
print(''' Press 1 for tan(A-B)
and 2 for tan(A+b)''')
choice=int(input('Press the suitable key for the question'))
if(choice==1):
p=(tana-tanb)/(1+tana*tanb)
print('The value for tan(',a,'-',b,') is',p)
elif(choice==2):
p=(tana+tanb)/1-(tana*tanb)
print('The value for tan(',a,'+',b,') is',p)
Comments
Post a Comment
THANK YOU FOR COMMENTING !
PLEASE SUBSCRIBE TO OUR WEBSITE FOR LATEST UPDATES