import math
#initialisation of variables
c=8*10**-5 # molar
n=2.0
#CALCULATIONS
Ksp=c**3*n**2
#RESULTS
Ksp=Ksp*10**15
x=Ksp
print 'solubility product =',Ksp,'* 10**-15'
print 'solubility=',x,'* 10**6'
import math
#initialisation of variables
Ksp=2*10**-12
M=8.84*10** -5 # molar
n=2.0
#CALCULATIONS
r=(Ksp/(n**2*M**3))**(1/3)
#RESULTS
print 'mean ionic activity cooeficient =',r
import math
#initialisation of variables
from math import sqrt
n=2.0
C=0.01 #M
#CALCULATIONS
r=10**(-0.509*n*sqrt(C))
r=round(r,3)
#RESULTS
print 'mean ionic activity coeficient =',r
import math
#initialisation of variables
M=18 #gms
k=5.5*10** -8 #ohmˆ−1 cmˆ−1
lc=349.8 #cmˆ2 equivˆ−1 ohmˆ−1
la=198 #cmˆ2 equivˆ−1 ohmˆ−1
#CALCULATIONS
A=M*k
A0= lc+la
a=A/A0
a1= 1000*a/M
Kw=a1*a1
#RESULTS
a1=a1* 10**5
a1=round(a1,2)
Kw=Kw* 10**10
Kw=round(Kw,4)
print 'degree of ionisation =',a1,'* 10**-5'
print 'ion product of water =',Kw,'* 10**-10'
import math
#initialisation of variables
Ka=1.772*10** -4
#CALCULATIONS
pK=-math.log10(Ka)
#RESULTS
pK=round(pK,3)
print 'pKa =',pK
import math
#initialisation of variables
K=1.75*10** -5
c=0.01 #M
#CALCULATIONS
r=10**( -0.509*sqrt(c))
Ka=K/r**2
#RESULTS
print 'ionisation constant =',format(Ka, '.8f')
import math
#initialisation of variables
from math import sqrt
ka=1.75*10** -5
ca=0.1 #mole lit
#CALCULATIONS
pH=-math.log10(sqrt(ka*ca))
#RESULTS
pH=round(pH,3)
print 'pH =',pH
import math
#initialisation of variables
kw=10**-14
ka=2.69*10** -5
c=0.1 #N
#CALCULATIONS
pH=-math.log10(sqrt(kw*ka/c))
#RESULTS
pH=round(pH,3)
print 'pH =',pH
import math
#initialisation of variables
pH=4.57
M=0.03 #mole litre ˆ−1
M1=0.1 #mole litre ˆ−1
#CALCULATIONS
pH1=pH+math.log10(M1/M)
#RESULTS
pH1=round(pH1,3)
print 'pH=',pH1
import math
#initialisation of variables
pH=9.26
M=0.02 #N
M1=0.01 #/N
#CALCULATIONS
pH1=pH+math.log(M1/M)
#RESULTS
pH1=round(pH1,3)
print 'pH=',pH1
import math
#initialisation of variables
pKa=6.84
n=0.04 #mole
n1=0.02 #mole
n2=0.001 #mole
pH3=7.0
#CALCULATIONS
pH=pKa+math.log10(n/n1)
pH1=pKa+math.log10((n-n2)/(n1+n2))
dpH=pH-pH1
pH2=-math.log10(n2)
dpH1=pH3-pH2
#RESULTS
pH1=round(pH1,2)
dpH=round(dpH,2)
print 'pH =',pH1
print 'dpH =',dpH
print 'dpH =',dpH1