In [2]:

```
import math # Example 27_1
#What fraction of atomic mass of Uranium is due to its electrons
n=92 #Units in constant
mass=0.000549 #Units in u
tmass=235 #units in u
per=(n*mass)/tmass #Units in fractions
print "The fraction of atomic mass of Uranium is due to its electrons is=",round(per,6)
```

In [3]:

```
import math # Example 27_2
#To find the density of gold nucleus
r=6.97*10**-15 #Units in meters
a=197 #Units in u
v=(4/3.0)*math.pi*r**3 #Units in meter**3
m1=1.66*10**-27 #Units in Kg/u
mass=a*m1 #Units in Kg
p=mass/v #Units in Kg/meter**3
print "The density of gold nucleus is p="
print p,"Kg/meter**3"
```

In [4]:

```
import math # Example 27_3
#To calculate the energy required to change the mass of a system
c=3*10**8 #units in meters/sec
m=1.66*10**-27 #Units in g
e=m*c**2 #Units in J
e=e/(1.6*10**-19)*10**-6 #Units in MeV
print "The energy required to change the mass of a system is=",round(e,1)," MeV"
#In text book answer is printed wrong as e=931.5Mev the correct answer is933.7 MeV
```

In [5]:

```
import math # Example 27_4
#To compute the binding energy of deuterium
m1=2.014102 #Units in u
m2=0.000549 #Units in u
total=m1-m2 #Unts in u
m3=1.007276 #Units in u
m4=1.008665 #Units in u
suma=m3+m4 #Units in u
massdefect=suma-total #units in u
e1=931.5 #Units in MeV
m5=1 #Units iin eV
e=massdefect*e1/m5 #Units in MeV
print "The binding energy of deuterium is E=",round(e,2)," MeV "
```

In [6]:

```
import math # Example 27_5
#To find how much of the orignal I will still present
d1=20.0 #Units in mg
d2=d1/2 #Units in mg
d3=d2/2 #Units in mg
d4=d3/2 #Units in mg
d5=d4/2 #Units in mg
d6=d5/2 #Units in mg
d7=d6/2 #Units in mg
print "After 48 days only ",round(d7,3)," mg will remain"
```

In [7]:

```
import math # Example 27_6
#To find how many radium atoms in the vial undergo decay
t1=5.1*10**10 #Units in sec
lamda=0.693/t1 #Units in sec**-1
n1=6.02*10**26 #Units in atoms/Kmol
n2=226 #Units in Kg/Kmol
m1=0.001 #Units in Kg
N=n1*m1/n2 #Units in number of atoms
deltat=1 #Units in sec
deltan=-lamda*N*deltat #Units in Number
print "The number of dis integrations per sec="
print deltan
```

In [8]:

```
import math # Example 27_7
#To find what fraction of uranium remains undecayed today
t1=4.5*10**9 #Units in Years
lamda=0.693/t1 #Units in years**-1
t=4*10.0**9 #Units in Years
n_no=math.e**(-lamda*t) #Units in Fractions
print "The fraction of uranium remains undecayed today is=",round(n_no,2)
```

In [9]:

```
import math # Example 27_8
#To calculate the decay constant and half life of substance
n_no=0.9 #Units in constant
t=12 #Units in h
lamda=math.log(1/n_no)/t #Units in h**-1
t1=round(0.693/lamda) #Units in h
print "The decay constant is lamda=",round(lamda,7)," h**-1\n The Half life is t0.5=",round(t1)," h"
```

In [10]:

```
import math # Example 27_9
#To fnd the approximate energy of the emitted alpha particle
m1=222.01753 #Units in u
m3=4.00263 #Units in u
m2=218.00893 #Units in u
massloss=m1-(m2+m3) #Units in u
e1=931.5 #Units in MeV
e=e1/massloss*10**-5 #Units in MeV
print "The approximate energy of the emitted alpha particle is E=",round(e,2)," MeV"
#In textbook answer s printed wrong as E=5.56eV the correct answer is E=1.56 eV
```

In [11]:

```
import math # Example 27_10
#To find the fraction of original amount still existence in earth
t1=1.41*10**10 #Units in Years
lamda=0.693/t1 #Units in year**-1
t=5*10**9 #Units in years
n_no=math.e**-(lamda*t) #Units in constant
n_no=n_no*100 #Units in percentage
print "The percentage of original amount still remainng is N/No=",round(n_no,3)," Percent"
```

In [12]:

```
import math # Example 27_11
#To find the activity of sr
t1=28 #units in Years
t1=t1*86400*365 #Units in sec
acti=6.022*10**26 #Units of Bq
m1=90 #Units in Kg
m2=0.001 #Units in Kg
N=(m2/m1)*acti #Units in constant
activity=0.693*N/t1 #Units in Bq
print "The activity of sr="
print activity
print "Bq"
```

In [13]:

```
import math # Example 27_12
#To estimate the age of the axe handle
n_no=0.034
t1=5730 #Units in Years
t=-(math.log(n_no)*t1)/0.693 #Units in Years
print "The age of the axe handle is t=",round(t)," years"
#In textbook answer is printed wrong as t=28000 years correct answer is t=27958 years
```

In [14]:

```
import math # Example 27_13
#To find the energy released in the reaction
m1=141.91635 #Units in u
m2=89.91972 #Units in u
m3=4.03466 #Units in u
n2=36 #Units in Constant
n1=56 #Units in Constant
n4=92 #units in constant
m5=236.04564 #Units in u
loss=m5-(m1+m2+m3)+n4-(n1+n2) #Units in u
e1=931.5 #units n MeV
energy=round(e1*loss) #units in MeV
print "The energy released in the reaction E=",round(energy)," MeV"
```