from __future__ import division
import math
# Initialization of Variable
Dm = 8 #in
wm = 1200 #rev/min
Qm = 2.33 #ft3/s
pm = 1.94 #slug/ft3
Wpmdot = 12 #hp
D = 12 #in
w = 1000 #rev/min
#calculations:
#the prototype volumetric flow rate
Q = Qm*(w/wm)*(D/Dm)**3
p = pm
#the prototype power
Wpdot = (p/pm)*(w/wm)**3*(D/Dm)**5*Wpmdot
#Results
print "the power required is", round(Wpdot,1),"hp"