In [1]:
import pint
ureg = pint.UnitRegistry()
In [4]:
v = 5400e-2 * ureg.meter/ureg.second
In [6]:
v.ito(ureg.mile/ureg.hour)
print(round(v,1))
In [8]:
p = 4.3 *ureg.psi
In [10]:
p.ito(ureg.Pa)
print(round(p,0))
In [11]:
d = 25.87*ureg.g/(ureg.cm**3)
d
Out[11]:
In [13]:
d.ito(ureg.pound/(ureg.foot**3))
print(round(d,0))
In [21]:
ps = 87.41 * ureg.force_pound/(ureg.foot**2)
ps
Out[21]:
In [22]:
ps.ito(ureg.N/(ureg.meter**2))
ps
Out[22]:
In [25]:
pr = 221e5 * ureg.lb/ureg.inch**2
pr
Out[25]:
In [31]:
pr.ito(ureg.g/ureg.cm**2)
print('{0:1.2e}'.format(pr))
In [ ]: