You will write functions that find a ground distance, a ladder's height and foot, and the sun's altitude.
The idea. A ground distance is . A ladder of length at angle reaches and has its foot from the wall. The angle whose tangent is a ratio comes from math.atan.
Your tasks.
ground_distance, return the distance from the height and the angle in degrees.ladder, return the pair (height, foot) for a ladder of the given length and angle with the ground.sun_altitude, return the sun's altitude in degrees from the pole height and the shadow length.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…