You will write three functions for a locked fault: how often it slips, the seismic moment of each earthquake, and its moment magnitude.
The idea. The time between earthquakes is the slip divided by the speed of the plates (change metres to centimetres first). The seismic moment is , with the area in m² from a length and a depth in km. The magnitude is .
Your tasks.
years_between, return the years between earthquakes from the slip in m and the speed in cm a year.moment, return in N m from the length and depth of the fault in km and the slip in m.magnitude, return the moment magnitude.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…