On Wed, Jul 28, 2010 at 11:41 AM, David Hutto <smokefl...@gmail.com> wrote: > From a practice exercise in Building Skills In Python page 64 I'm > working on How Much Does The Atmosphere Weigh? Part 1: > To check it states that the answer should be app. 10**18kg However, > and I've checked to make sure that the math I've layed out matches up > with the texts, I get 5.07360705863e+20 >
Either there is an error in the texts, or you have not checked throughly enough. It goes wrong here: > """We can use g to get the kg of mass from the force of air > pressure P0. Apply the acceleration of gravity > (in m/sec2) to the air pressure (in kg · m/sec2). This result is > mass of the atmosphere in kilograms per > square meter (kg/m2). > Mm2 = P0 × g""" > masAtmoInKgPerSqM = airPressCLevl * gravity The Air pressure is in Pascal, which is kg / (m*s^2), not (kg * m)/s^2 as you state. That is the Newton. Pascal can also be written as Newton/m^2, which is (M*g)/m^2. So to get mass per square meter, you should divide by the acceleration g, not multiply. With that modification I get about 5e18, which seems correct. Hugo _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor