You will write three small functions that use the delay between the P wave and the S wave.
The idea. In the crust P waves travel about 6 km/s and S waves about 3.5 km/s. Each second of delay between them means about 8.4 km of distance.
Your tasks.
distance, return how far away the earthquake was, in km, for a delay of delay seconds.p_arrival, return the time in seconds that a P wave takes to travel km km.closest, the dictionary delays holds station names and delays. Return the name of the station closest to the earthquake.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…