You will solve , and for with a list of candidate angles. The function keep is given: it keeps the angles in range, rounds them to decimal place, removes repeats and sorts them.
Your tasks.
solve_sin, return [] if . Otherwise let a be math.degrees(math.asin(k)) and pass the candidates a, 180 - a and the same angles plus or minus 360 to keep.solve_cos, do the same with a = math.degrees(math.acos(k)) and the candidates a and 360 - a, with a shift of 360.solve_tan, use a = math.degrees(math.atan(k)) and the candidates a, a + 180 and a + 360.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…