Each body in the list has a mass and a radius. You will make the program find on each one with , pick out the body with the strongest gravity, and compare the Earth with the Moon. Then it draws as bars.
The idea. A bigger mass gives a bigger ; a bigger radius gives a smaller one, because the surface is further from the centre.
Your tasks.
g for each body, in .strongest to the name of the body with the biggest .times, how many times on the Earth is on the Moon.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…