Question: The following code computes the total work done against gravity by the 2 tensions and the weight of the piano in problem 9 above. np

The following code computes the total work done against gravity by the 2 tensions and the weight of the piano in problem 9 above. np.dot is a function that computes the algebraic definition of the dot product. Manually, that is, using pen and paper, evaluate the code by substituting the numbers in the appropriate places. For example, the first time you run the loop, magnitude will be 1830 and angle will be 120 since the first tuple of the forces list is (1830,120). In the next line of code, force_x will be 1830cos(120)=-915, and so on. a. What is the total work done against gravity? Why do you think this is the case? b. How does the code solution compare to your other solution for problem 9? c. What changes would you make to the code if you wanted to compute only the work done by weight against gravity?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!