You will write three small functions that tell a traveller which guide stars to use.
The idea. North of the equator the Pole Star is above the horizon, at a height equal to the latitude. South of the equator it cannot be seen. The Southern Cross can be seen from the south and from places up to about 25 degrees north. Latitudes south of the equator are written here as negative numbers.
Your tasks.
pole_star_height, return the height of the Pole Star for a latitude, or 0 if it is below the horizon.sees_southern_cross, return True if the latitude is less than 25, and False if not.guides, return a list of the guides the place can use: "Pole Star", "Southern Cross", or both, in that order.Run your code once to unlock the worked solution.
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…