A ball is thrown straight up at . You will make the program find the time to the top and the greatest height on the Earth, and the time in the air on the Moon. Then it draws the height against the time on the Earth, with a dashed line at the greatest height.
The idea. On the way up the ball loses of speed every second, so it stops after , at a height . The fall back takes as long as the rise.
Your tasks.
t_top, the time to the top on the Earth, in seconds.h_max, the greatest height on the Earth, in metres.t_moon, the whole time in the air on the Moon, in seconds.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…