Facebook
From woj, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 98
  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.  
  9.  
  10.     ang = float(input("what's your angle ?: "))
  11.     the_divided_num = float(180 / ang)
  12.     x = math.sin(math.pi / the_divided_num)
  13.    
  14.  
  15.     answer = (x *user_1)
  16.     print(f"this is your missing side is {answer}")
  17.  
  18. elif user_3 == 'hypotenuse':
  19.     user_4= int(input("what is the opposite "))
  20.     angle = float(input("what's your angle ?: "))
  21.     the_divided_num = float(180 / angle)
  22.     x_1 = math.sin(math.pi / the_divided_num)
  23.  
  24.        
  25.     answe = (x_1 /user_4)
  26.     print(f"this is your missing side is {answe}")
  27.    
  28.    
  29.    
  30.    
  31.    
  32.     Traceback (most recent call last):
  33.    line 15, in <module>
  34.     answer = (x *user_1)
  35. NameError: name 'user_1' is not defined
captcha