Facebook
From Blush Anoa, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 105
  1. import math
  2.  
  3. user = input("are you using sin")
  4. if user == 'yes':
  5.     user_3 = input("which side is unknown")
  6.     if user_3 == 'opposite':
  7.         user_1 = int(input("what is the hypotenuse"))
  8.         ang = float(input("what's your angle ?: "))
  9.         the_divided_num = float(180 / ang)
  10.         x = math.sin(math.pi / the_divided_num)
  11.  
  12.     answer = (x * user_1)
  13.     print(f"this is your missing side is {answer}")
  14.  
  15. elif user_3 == 'hypotenuse':
  16.     user_4 = int(input("what is the opposite "))
  17.     angle = float(input("what's your angle ?: "))
  18.     the_divided_num = float(180 / angle)
  19.     x_1 = math.sin(math.pi / the_divided_num)
  20.  
  21.     answe = (x_1 / user_4)
  22.     print(f"this is your missing side is {answe}")