Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- user = input("are you using sin cos or tan? ")
- user_3 = input("which side is unknown? ")
- if user == 'sin' and user_3 == 'opposite':
- #and user_3 == 'opposite':
- user_1 = int(input("what is the hypotenuse? "))
- ang_1 = float(input("what's your angle ?: "))
- the_divided_num = float(180 / ang_1)
- x_1 = math.sin(math.pi / the_divided_num)
- answer1 = (x_1 / user_1)
- print(answer1)
- if user_3 == 'hypotenuse' and user == 'sin':
- user_1 = int(input("what is the opposite? "))
- ang = float(input("what's your angle ?: "))
- the_divided_num = float(180 / ang)
- x = math.sin(math.pi / the_divided_num)
- answer = (x / user_1)
- print(answer)
- elif user == 'cos':
- user_5 = input("which side is unknown? ")
- if user_5 == 'hypotenuse' and user == 'cos':
- x=int(input("what is is the ajecent"))
- result_! = math.cos(math.radians(x))
- ans!=(result_! / x)
- print(ans!)
- if user_5 == 'ajecent' and user == 'cos':
- a= int(input("what is the hypotenuse? "))
- result_2 = math.cos(math.radians(a))
- ans=(result_2 / a)
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement