#calculate the wave function
#initialization of variables
import math
from math import sqrt
a2=1/8.
#calculations
b2=1-a2
a1=sqrt(a2)
b1=sqrt(b2)
#results
print '%s %.2f %s %.2f %s' %(" Wave function is",a1, "phi1 +",b1,"phi2")
#calculate the Bond angle
#initialization of variables
import math
sinu=2/math.sqrt(3.)
cosu=math.sqrt(2/3.)
#calculations
tanu=sinu/cosu
u=math.atan(sinu/cosu) *180/math.pi
#results
print '%s %.2f %s' %("Bond angle =",2*u,"degrees")
#calculate the Pauling strength
#initialization of variables
import math
cosu=1/math.sqrt(3.)
sinu=math.sqrt(2./3)
#calculations
f=1/2. + math.sqrt(3.) /2. *cosu + math.sqrt(3./2) *sinu
#results
print ' %s %d' %("Pauling strength = ",f)
#calculate the Wave function
#initialization of variables
import math
alpha=60.*math.pi/180.
#calculations
cosa=math.cos(alpha)
sina=math.sin(alpha)
#results
print '%s %.2f %s %.2f %s' %("Wave function =",cosa,"s +",sina,"pz")
#calculate the Bond energy
#initialization of variables
DHH=103. #kcal/mol
#calculations
DHHp=0.5*(DHH)
#results
print '%s %.1f %s' %("Bond energy =",DHHp,"kcal/mol")
#calculate the Exchange energy
#initialization of variables
DHH=42 #kcal/mol
#calculations
DHHp=0.5*(DHH)
#results
print '%s %.1f %s' %("Exchange energy =",DHHp,"kcal/mol")