Chapter 13 - Atomic structure

Example I2 - Pg 302

In [1]:
#calculate the probability of finding the electron and the chance that the electron would be found
#Initialization of variables
import math
dv=1 #pm^3
a0=52.9 #pm
#calculations
Probability=dv/(math.pi*a0*a0*a0)
#results
print '%s %.1e' %("probability of finding electron = ",Probability)
print '%s %d %s' %("\n Chance that electron would be found is one in",1./Probability,"times")
#The answer is a bit different due to rounding off error in textbook
probability of finding electron =  2.2e-06

 Chance that electron would be found is one in 465068 times

Example I3 - Pg 304

In [2]:
#calculate the probability of finding the electron
#Initialization of variables
import math
dr=1 #pm
r=52.9 #pm
#calculations
Probability=4*math.pow(math.e,(-2)) *dr/r
#results
print '%s %.1f' %("About 1 inspection in ",1./Probability)
#The answer is a bit different due to rounding off error in textbook
About 1 inspection in  97.7