Advertisement
Guest User

help

a guest
Apr 6th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. import math
  2.  
  3. user = input("are you using sin cos or tan? ")
  4. user_3 = input("which side is unknown? ")
  5.  
  6.  
  7. if user == 'sin' and user_3 == 'opposite':
  8.      #and user_3 == 'opposite':
  9.     user_1 = int(input("what is the hypotenuse? "))
  10.     ang_1 = float(input("what's your angle ?: "))
  11.     the_divided_num = float(180 / ang_1)
  12. x_1 = math.sin(math.pi / the_divided_num)
  13.  
  14. answer1 = (x_1 / user_1)
  15. print(answer1)
  16.  
  17.  
  18. if user_3 == 'hypotenuse' and user == 'sin':
  19.     user_1 = int(input("what is the opposite? "))
  20. ang = float(input("what's your angle ?: "))
  21. the_divided_num = float(180 / ang)
  22. x = math.sin(math.pi / the_divided_num)
  23.  
  24. answer = (x / user_1)
  25. print(answer)
  26.  
  27.  
  28.  elif user == 'cos':
  29. user_5 = input("which side is unknown? ")
  30.  
  31. if user_5 == 'hypotenuse' and user == 'cos':
  32. x=int(input("what is is the ajecent"))
  33. result_! = math.cos(math.radians(x))
  34.  
  35. ans!=(result_! / x)
  36. print(ans!)    
  37.    
  38.  
  39. if user_5 == 'ajecent' and user == 'cos':
  40.      a= int(input("what is the hypotenuse? "))
  41. result_2 = math.cos(math.radians(a))
  42.  
  43.  
  44. ans=(result_2 / a)
  45. print(ans)
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement