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. /How fast does a cyclone move?
Earth and Environmental ScienceHardHigh School (11–12)The Atmosphere and Weather

How fast does a cyclone move?

Forecasters give a cyclone's position every six hours as a latitude and a longitude. Here is a model track of a cyclone moving north through the Bay of Bengal. You will find how far and how fast it moves.

The idea. The distance between two points on a sphere of radius R=6371 kmR = 6371\ \text{km}R=6371 km comes from the haversine formula. With the latitudes φ1,φ2\varphi_1, \varphi_2φ1​,φ2​ and longitudes λ1,λ2\lambda_1, \lambda_2λ1​,λ2​ in radians, first work out

s1=sin⁡2φ2−φ12\displaystyle s_1 = \sin^2\dfrac{\varphi_2 - \varphi_1}{2}s1​=sin22φ2​−φ1​​
s2=cos⁡φ1cos⁡φ2 sin⁡2λ2−λ12\displaystyle s_2 = \cos\varphi_1\cos\varphi_2\,\sin^2\dfrac{\lambda_2 - \lambda_1}{2}s2​=cosφ1​cosφ2​sin22λ2​−λ1​​

Then h=s1+s2h = s_1 + s_2h=s1​+s2​ and d=2Rarcsin⁡hd = 2R\arcsin\sqrt{h}d=2Rarcsinh​.

Your tasks.

  1. In distance_km, return the distance between two points.
  2. In speeds, return the list of speeds in km/h for each six-hour step.
  3. In track_length, return the total length of the track.

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, look at the speeds. Is the storm speeding up as it nears the coast? At its last speed, how long would it take to cover another 300 km300\ \text{km}300 km?

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
← Is the afternoon air ready for storms?From digital numbers to a map of green →
More onThe Atmosphere and Weather

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Air masses, fronts and cyclonesClouds, Stability and Weather Systems

More labs on this topic

  1. Is the afternoon air ready for storms?Hard
  2. How much of India's rain the monsoon bringsHard
  3. Geostrophic winds at five citiesHard
  4. The carbon dioxide record and its forcingHard
Finding the tropopause in a balloon soundingHard
All labs on this topic →