# Variables
F = 730.; #Force(N)
g_texas = 9.792; #Acceleration of gravity in Houston,Texas(m/s**2).
g_moon = 1.67; #Acceleration of gravity at moon(m/s**2).
# Calculations
m = round(F/g_texas,2); #Mass of Astronaut(Kg)
F_moon = round(m*g_moon,2); #Force on Moon(N)
# Results
print 'Mass of Astronaut',m, "Kg"
print 'Force on Moon',F_moon,'N'
import math
# Variables
d = 0.01 #Diameter(m)
m = 6.14 #Mass(Kg)
g = 9.82 #Acceleration of gravity
Pb = 748. #Barometric Pressure(Torr)
# Calculations
F = round(m*g,3); #Force(N)
A = (math.pi/4)*d*d; #Area(m**2)
Pg = round(F/A,-2); #Gauge Pressure(N/m**2)
Pa = round(Pg+(Pb*0.013332*(10**4)),-2); #Absolute Pressure(Pa)
# Results
print 'Force ',F,'N'
print 'Gauge Pressure ',Pg/10**4,'(X 10**4) N/m**2'
print 'Absolute Pressure',Pa/1000,'KPa'
# Variables
T = 300.15; #Temp = 300.15K(27`C)
h = 60.5*(10**-2); #Height = 60.5cm
rho = 13530.; #Density(Kg/m**3)
g = 9.784; #Acceleration of gravity(m/s**2)
# Calculations
P = round(h*rho*g,0);
# Results
print 'Pressure in KPa %.2f'%(P/1000),'KPa'
print 'Pressure in bar %.4f'%(P/100000),'bar'
import math
from scipy.integrate import quad
# Variables
M = 2500.; #Mass = 2500Kg
h1 = 10.; #height1 = 10m
h2 = 100.; #height2 = 100m
g = 9.8; #Acceleration of gravity(m/s**2)
# Calculations and Results
#(a)
PE1 = M*h1*g; #[j]
print '(a)Potential energy of the elevator in its Initial Position',PE1,'J'
#(b)
def f0(l):
return 1
W = M*g* quad(f0,h1,h2)[0]; #[j][0]
print '(b)Work Done in Raimath.sing the Elevator',W,'J'
#(c)
PE2 = M*g*h2; #[j]
print '(c)Potential energy of the elevator in its Highest Position',PE2,'J'
#(d)
KE2 = 0;
PE3 = 0;
KE3 = PE2; #[j] #Conservation Of Mechanical Energy
u = round((2*KE3/M)**(1./2),2); #(m/s)
print '(d)Velocity of the Elevator',u,'m/s'
print '(d)Kinetic Energy of the Elevator',KE3,'J'
#(e)
PE_Spring = KE3; #[j]
print '(e)Potential energy of compressed spring ',PE_Spring,'J'
#(f)
TE = PE1+W;
print '(f)Total Energy of the System',TE,'J'