HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Reading the shadow zones from a station list
Earth and Environmental ScienceHardHigh School (11–12)The Earth's Structure and Interior

Reading the shadow zones from a station list

A network recorded a large earthquake. For each station it lists the distance from the source in degrees and whether a direct P wave and a direct S wave were seen. You will find the shadow zones and estimate the size of the core.

The idea. Beyond some distance no S wave arrives, because it cannot cross the liquid core. The P waves are missing in a band. If the rays were straight, the edge of the S shadow would give the core radius from cos⁡(Δe/2)=rc/R\cos(\Delta_e/2) = r_c/Rcos(Δe​/2)=rc​/R.

Your tasks.

  1. In s_edge, return the edge of the S shadow: the middle between the farthest station that saw S and the nearest station beyond it.
  2. In p_gap, return the first and the last distance at which P was not seen.
  3. In core_radius, return the radius in km of a core whose straight-ray shadow edge is the given angle, with R=6371 kmR = 6371\ \text{km}R=6371 km.

Run it first, just as it is. The checker at the end prints FAIL for each task. Then do the tasks one at a time, and run the program again after each one. A Hint appears under every check that still fails.

When every line says PASS, compare your core radius with the true 3480 km3480\ \text{km}3480 km. It is too large. Why? Think about how the speed changes with depth.

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

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 save
← All Labs
← Locating an earthquake from three stationsReducing a line of gravity readings →
More onThe Earth's Structure and Interior

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Shadow zones, the core and densitySeismic Waves and the Layers of the Earth

More labs on this topic

  1. The speed of a drifting continentHard
  2. Fitting a geotherm to a boreholeHard
  3. Which density contrast fits the crust?Hard
  4. Reducing a line of gravity readingsHard
Locating an earthquake from three stationsHard
All labs on this topic →