Question: Remember, when not coerced into a type, None doesn t return anything. This problem asks you to implement a smart problem solver for triangles.

Remember, when not coerced into a type, None doesnt return anything. This problem asks you
to implement a smart" problem solver for triangles.
To remind you, in a right triangle:
tan \theta = A
B (40)
tan1(tan \theta )= tan1( A
B )(41)
\theta = tan1( A
B )(42)
The equations on lines (41-42) show the inverse tangent. The math module has both tangent
(as math.tan) and inverse tangent (math.atan). These use radians instead of degrees, so youll
have to convert. The math module also has functions to convert: math.radians() takes degrees
and returns radians, math.degrees() takes radians and returns degrees. To remind you:
\pi radians =180 degrees
In this problem, youll write a smart problem solver. The user calls the function solve(theta,opposite,
adjacent). When one of the variables is None, the function returns the answer for that missing
value. Remember, None is considered False as a Boolean value. When all the variables have
values, the function returns whether the equation is True or False. Heres a run:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!