Four displacements are laid head to tail, and the program draws them. Your job is to make it find their sum, the resultant: its two parts, its size and its direction.
The idea. Add all the parts, add all the parts, and then put the two totals back together:
Your tasks.
dx to total_x and each dy to total_y.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…