You will write three small functions: the risk score of a town, the ratio of the energies of two earthquakes, and the chance that a rare event happens at least once.
The idea. In the simple model, risk is . The energy ratio for a difference of magnitude steps is . The chance of at least one event with a return period in years is , which we show in percent.
Your tasks.
risk, return .energy_ratio, return for steps magnitude steps.chance_percent, return the chance in percent for a return period t years over n years.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…