# Variables
p1 = 17.222 #mm
p2 = 17.535 #mm
n = 1. #mole
m = 1000 #gms
M = 18.016 #gms
# Calculations
a = p1/p2
N1 = (m/M)/(n+(m/M))
# Results
print 'activity = %.4f '%(a)
print ' activity coefficient = %.4f '%(N1)
# Variables
import math
M = 0.1 #molal
Tf = 0.345 #C
k = -9.702*10**-3
k1 = -5.2*10**-6
# Calculations
a = math.e**(k*Tf+k1*Tf**2)
# Results
print 'activity = %.4f '%(a)
# Variables
import math
R = 1.98*10**-4 #cal mole**-1 deg**-1
T = 20. #C
E = -0.11118 #volt
n2 = 0.00326
n21 = 0.0986
# Calculations
r = 10**((-E/(R*(273.16+T)))-math.log10(n21)+math.log10(n2))+n21
a2 = r*n21
# Results
print 'a2/N2 = %.3f '%(r)
print ' a2 = %.4f '%(a2)
# Variables
n1 = 0.424 #mole fraction
a2 = 3.268
n = 8.3
# Calculations
r = a2/(n*n1)
# Results
print 'a2/N2 = %.3f '%(r)
# Variables
e = 0.7865 #volt
emf = 0.8085 #emf
T = 500. #C
R = 1.98*10**-4 #cal mol6-1 deg**-1
n2 = 0.5937
# Calculations
a2 = 10**((e-emf)/(R*(273+T)))
r = a2/n2
# Results
print 'activity coefficient = %.2f '%(r)
# Variables
import math
ac = 1.211
n2 = 0.5937
# Calculations
b = math.log10(ac)/(1-n2)**2
# Results
print 'Constant = %.4f '%(b)