K1ngkai

Untitled

Apr 12th, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 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. if user == 'sin' and user_3 == 'opposite':
  7. # and user_3 == 'opposite':
  8. user_1 = int(input("what is the hypotenuse? "))
  9. ang_1 = float(input("what's your angle ?: "))
  10. the_divided_num = float(180 / ang_1)
  11. x_1 = math.sin(math.pi / the_divided_num)
  12. answer1 = (x_1 / user_1)
  13. print(answer1)
  14.  
  15. if user_3 == 'hypotenuse' and user == 'sin':
  16. user_1 = int(input("what is the opposite? "))
  17. ang = float(input("what's your angle ?: "))
  18. the_divided_num = float(180 / ang)
  19. x = math.sin(math.pi / the_divided_num)
  20. answer = (x / user_1)
  21. print(answer)
  22.  
  23. else:
  24. user_5 = input("which side is unknown? ")
  25.  
  26. if user_5 == 'hypotenuse' and user == 'cos':
  27. result_9 = int(input("what is the angle"))
  28. result_7 = int(input("what is is the ajecent"))
  29. result_6 = math.cos(math.radians(result_7))
  30. answer_6 = (result_6 / result_9)
  31. print(answer_6)
Advertisement
Add Comment
Please, Sign In to add comment