You will write three functions: the scalar projection of one vector on another, the vector projection, and the work done by a constant force. The checker uses the numbers of the worked example and a force that does negative work.
The idea. The scalar projection of on is . The vector projection multiplies by . The work is the dot product of the force and the displacement.
Your tasks.
scalar_projection(a, b).vector_projection(a, b). Return a tuple of three numbers.work(F, d). Return the work in joules.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…