The following cells compute pressure using the ideal gas law.
$$P = \frac{n R T}{V}$$# Comment
V = 22.4
T = 284.
R = 8314.
n = 2.
P = n*R*T/V
print "Pressure = ", P, "pascals"
Pressure = 210819.285714 pascals
!pip install pint
Requirement already satisfied (use --upgrade to upgrade): pint in /Users/jeff/anaconda/lib/python2.7/site-packages
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
from pint import UnitRegistry
ur = UnitRegistry()
V = 22.4 * ur.liter
T = 284. * ur.kelvin
n = 2.0 * ur.mol
R = 8314.0 * ur.Pa * ur.liter/ur.kelvin/ur.mol
P = n*R*T/V
print P
210819.285714 pascal
print P.to(ur.psi)
30.5767522699 psi
print P.to(ur.atm)
2.08062458144 atmosphere