#calculate the Rate constant
#Initialization of variables
import math
P1=69.2 #mm
P2=39.8#mm
t=20 #min
#calculations
k=2.303*math.log10(P1/P2) /(t*60.)
#results
print '%s %.2e %s' %("Rate constant =",k,"sec^-1")
#calculate the Rate constant
#Initialization of variables
import math
t=10. #min
x=90.
#calculations
k=2.303*math.log10(100/(100-x)) /t
#results
print '%s %.3f %s' %("Rate constant =",k,"min^-1")
#calculate the rate constant
#Initialization of variables
t=242. #sec
P=229. #mm
P0=363. #mm
#calculations
k=(1./P -1./P0)/t
#results
print '%s %.2e %s' %("rate constant=",k,"sec^-1 mm^-1")