In [1]:

```
#initialisation of variables
W=1000.0 #weight lbf
D=1.25 #distance ft
#CALCULATIONS
Work=W*D
#IN SI unit
W=4448 #weight N
D=0.381 #distance m
Work1=W*D
#RESULTS
print('The work from the system would be = %.2f ft-lbf' %Work)
print('The work from the system in SI unit would be = %.2f m-N' %Work1)
```

In [2]:

```
#initialisation of variables
F1=100.0 #Force lbf
F2=2000.0 #Force lbf
L2=12 #in
#CALCULATIONS
L11=L2*(F2/F1)
#IN SI unit
F1=444.8 #Force N
F2=8896.0 #Force N
L2=0.3048 #Force m
L12=L2*(F2/F1)
#RESULTS
print('The pump piston have to travel = %.2f in' %L11)
print('The pump piston have to travel = %.2f m' %L12)
```

In [3]:

```
#initialisation of variables
F1=150.0 #lbf Force
A1=0.049 #in^2 area
A2=0.785 #in^2 area
#CALCULATIONS
F21=F1*(A2/A1)
#IN SI unit
F1=667.2 #N(Force)
A1=31.7 #mm^2(Area)
A2=506.7 #mm^2(Area)
F22=F1*(A2/A1)
#RESULTS
print('The weight lifted by a downward force = %.2f lbf' %F21)
print('weight lifted by a downward force in SI unit = %.2f N' %F22)
```

In [4]:

```
#initialisation of variables
F =800.0 #lbf Force
D=20 #ft distance
t=20 #sec time
C=550 #ft-lbf/sec
#CALCULATIONS
HP=(F*D)/(t*C)
#RESULTS
print('The Horse powe required is = %.2f HP' %HP)
```

In [5]:

```
#initialisation of variables
V1=2000.0 #watts voltage
V2=746.0 #watts voltage
#CALCULATIONS
HP=V1/V2
#RESULTS
print('The Horse powe required is = %.2f HP' %HP)
```

In [6]:

```
#initialisation of variables
N=1200 #rev/min speed
A=(3.14*((1.125*1.125)*5))/4 #Cross section of the bore in in^2
L=1 # cylinder stroke (inch)
#CALCULATIONS
V=A*L
Q=V*N/231
#RESULTS
print('The displacement would be = %.2f in^3/rev' %V)
print('The flow rate would be = %.2f gal/min' %Q)
```

In [14]:

```
#initialisation of variables
P1=2000.0 #lbf/in^2 pressure
Q1=5 #gal/min flow rate
P3=13793.0 #kPa pressure
Q3=18.9 #liters/min flow rate
#CALCULATIONS
Fhp1=P1*Q1/1714 #In English units
Fhp2=(P1*4.448*1550*Q1*3.7851*0.001)/44760 #In SI unit
Fhp3=P3*Q3/44760 #with technique 3
#RESULTS
print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp1)
print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp2)
print('Using technique 1 the horsepower transmitted by system would be = %.2f hp' %Fhp3)
```

In [8]:

```
#initialisation of variables
THP=5.83 # Horse power
pi=3.14 #Pi value
N=500 #rev/min speed
#CALCULATIONS
T=(THP*33000)/(2*pi*N)
#RESULTS
print('The torque would be = %.2f lbf-ft' %T)
```

In [17]:

```
#initialisation of variables
T=2000.0 #lbf-ft torque
N=20.0 #rev/min speed
P=2000 #lbf/in^2 pressure
#CALCULATIONS
Q1=(1714*N*T)/(5252*P)
Fhp1=(P1*Q1)/1714
Q2=(44760*N*2712)/(7122*13793)
Fhp2=(13793*Q2)/44760
#RESULTS
print('In English units the flow rate would be = %.2f gal/min' %Q1)
print('In English units the Horsepower would be = %.2f hp' %Fhp1)
print('In SI units the flow rate would be = %.2f lit/min' %Q2)
print('In SI units the Horsepower would be = %.2f hp' %Fhp2)
```

In [10]:

```
#initialisation of variables
N=750.0 #rev/min speed
Q=5 #gal/min flow rate
P=1000 #lbf/in^2 pressure
#CALCULATIONS
T=(5252*P*Q)/(1714*N)
#RESULTS
print('The expected torque would be = %.2f lbf-ft' %T)
```