Skip to main content

12. Program to calculate the TRIGONOMETRIC PROBLEMS

#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

Popular posts from this blog

Programming for problem solving : Assignment no 1

 Assignment of programming for problem solving:  The questions for assignment is : The solution for the assignment is as follows :  Please subscribe the blog for more updates . Thank you! 🙏🙏

BEE ASSIGNMENT

 Here is the solution of BEE ASSIGNMENT    QUESTION 1 - QUESTION 5 Question 6 to Question 10  For maths assignment : click here  

1. Python program for railway reservation system

def reserve(CLASS):     if CLASS==1:         print('welcome to the REGULAR CLASS SEAT reservation')         dest=int(input('enter your destination in km  '))         stat=int(input('enter stations in between '))         price=10*dest         amount=price+(10*stat)         print('the price for 1 seat is =',amount)         seat=int(input('enter no of seats'))         total=amount*seat         print('your final price is =',total)         print('you will have to pay',total,'INR')         return total,seat,amount     if CLASS==2:         print('welcome to the FIRST CLASS TICKET reservation')         dest=int(input('enter your destination in km  '))         stat=int(input...