You will write the three steps a seismologist takes with one station's record: the distance from the gap, the time the earthquake started, and how its energy compares with another.
The idea. The gap between the S and P arrivals is . The P wave took to arrive, so the earthquake started that much earlier. On the moment magnitude scale the energy ratio is .
Your tasks.
distance, return the distance in km from the gap in seconds.start_time, return the time the earthquake started, in seconds after midnight, from the P arrival time and the distance.energy_ratio, return how many times more energy magnitude m1 releases than magnitude m2.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…