CPSC120 Assignment 2

Chuck Norris

If when Chuck Norris does a push-up he doesn’t push himself up, he pushes the world down, how much does Chuck Norris weigh and how strong is he?

Details

In physics, a body is a collection of masses that is considered to be one object. The center of mass of a body is the weighted average of all of the mass of the body. The center of mass of a uniformly dense sphere is the center of the sphere. The center of mass of a person is slightly below the belly button.

In a two-body system with no external forces, the center of mass of the system does not move if the center of mass of either body does move. This results in the following equation:

M1 ⋅ Δ r1 = M2 ⋅ Δ r2

Where M1 and M2 are the masses of the two bodies, and Δ r1 and Δ r2 are the changes in the centers of mass of the two bodies.

The center of mass of the human body moves when doing a push-up. If we assume that the Earth and a person comprise a two-body system with no external forces acting on them, then we can use the above equation to solve for the change in the center of mass of the earth. That is, given the mass of the earth, the mass of a person, and the amount the person’s center of mass moves when doing a push-up, it is possible to calculate how much the earth moves. It is also possible to calculate how much energy is required to move a body with the following equation:

E = Δ r ⋅ g ⋅ M

Where E is the energy, in joules, Δ r is the distance the center of mass moves, in meters, g is the gravity of Earth, 9. 81m / s2, and M is the mass of the body, in kilograms.

Write the following functions:

  1. A function that takes the mass, in kilograms, and the displacement of the center of mass, in meters, of one body, and the mass of a second body, in kilograms, and returns the displacement of the center of mass, in meters, of the second body.

  2. A function that takes the mass, in kilograms, and the displacement of the center of mass, in meters, of one body and the displacement of the center of mass, in meters, of a second body and returns the mass, in kilograms, of the second body.

  3. A function that computes the energy, in joules, given the mass, in kilograms, and the displacement of the center of mass, in meters, of a body.

Write a program that uses the above functions to do the following:

  1. Print how far the earth moves when an average person does a push-up. Assume the person has a mass of 70 kilograms, their center of mass moves 0. 2 meters, and the earth is 5. 97219 × 1024 kilograms. Also print the approximate diameter of an atom, in meters, for a basis of comparison.

  2. Print how massive Chuck Norris is, in kilograms, if when he does a push-up, he does not move. Assume that not moving is equivalent to moving a distance so small a human observer can not perceive it, about 10 micrometers. Also assume that the Earth’s center of mass moves 0. 2 meters.

  3. Print how much energy it takes Chuck Norris to do a push-up based on his calculated mass and the assumption that his center of mass moves 10 micrometers. Also print the approximate energy of a nuclear explosion, in joules, for a basis of comparison.

The program’s output should be well formatted with sentences explaining the output and units for all values. The program’s code should follow the course code conventions. This includes using meaningful names for values and small functions that do one thing.

Submission

Test: Submit your test code and program outline as a py file on the course Inquire site by 9 AM on Monday September 17th.

Code: Submit your code as a zip file on the course Inquire site by 5 PM on Friday September 21st.

Extra

A Different Planet: Add to the program calculations for how much Chuck Norris would have to weigh and how strong he would be on another planet. Also print how many more (or less) times massive and energetic he would be.

A Different Joke: Find a different Chuck Norris joke with interesting physical implications. Create a program that calculates and prints the results of the calculation.

Torque: The calculations in this assignment ignore some of the bio-mechanics involved in doing a push-up. Research and write a program that computes some of the rotational forces when Chuck Norris does a push-up.