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)
- else:
- user_5 = input("which side is unknown? ")
- if user_5 == 'hypotenuse' and user == 'cos':
- result_9 = int(input("what is the angle"))
- result_7 = int(input("what is is the ajecent"))
- result_6 = math.cos(math.radians(result_7))
- answer_6 = (result_6 / result_9)
- print(answer_6)
Advertisement
Add Comment
Please, Sign In to add comment