# Variables
v = 1.
m = 0.5
# Calculations
m1 = 2*m
m2 = 1*m
v1 = 2*v
v2 = 1*v
M = (m1**2*m2)**(1/(v1+v2))
# Results
print 'mean ionic molality = %.1f '%(m2)
print ' mean ionic molality = %.3f '%(M)
# Variables
n = 2
m = 0.01422
m1 = 0.00869
m2 = 0.025
# Calculations
M = m2+m1
M1 = (M*m1)**(1./n)
r = m/M1
# Results
print 'mean ionic molality = %.3f '%(r)
# Variables
mu = 1
mb = 2
m = 1
m1 = 2
# Calculations
ym1 = 0.5*(mu*m**2+mu*m**2)
ym2 = 0.5*(mb*m**2+m*m1**2)
ym3 = 0.5*(mu*m1**2+mu*m1**2)
# Results
print 'ionic strength of solution = %.f *m'%(ym1)
print ' ionic strength of solution = %.f *m'%(ym2)
print ' ionic strength of solution = %.f *m'%(ym3)