You will write three small functions about gravity. Use units of kilograms, metres and newtons.
The idea. The pull between two bodies is . The strength of gravity at the surface of a world is . The weight of a mass is .
Your tasks.
force, return the pull between two masses.surface_gravity, return from the mass and the radius of a world.weight, return the weight of a mass in a place with a strength of gravity g.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…