How does change as you go from the centre of a uniform Earth, up through the ground, and out into space? You will make the program draw it, read two values off the curve, and find the depth where is the same as up.
The idea. Outside, falls as : . Inside a uniform Earth only the mass nearer the centre pulls, and grows in step with : .
Your tasks.
g_r, the value of at every distance in r.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…