You will write the position, the speed and the meeting time of two particles as functions.
Your tasks.
position, return the position (x, y) of a particle after time t, from its start and its velocity.speed, return the magnitude of a velocity, using math.hypot.meeting_time, return the time at which two particles collide, or None if they do not. Find a time from the parts and a time from the parts. They must be equal.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…