In [1]:

```
#Variable declaration
e = 1.6e-019; # Energy equivalent of 1 eV, J/eV
m_n = 1.675e-027; # Mass of the neutron, kg
m_p = 1.672e-027; # Mass of the proton, kg
M_D = 3.343e-027; # Mass of the deutron, kg
c = 3e+08; # Speed of light, m/s
#Calculations
delta_m = m_n + m_p - M_D; # Mass defect in the formation of deuterium, kg
BE = delta_m*c**2; # Binding energy of the deuterium, J
BE_bar = BE/2; # Binding energy per nucleon of deuterium, J
#Result
print "Binding energy per nucleon for the deutron = %5.3f MeV"%(BE_bar/(e*1e+06))
```

In [2]:

```
#Variable declaration
amu = 931.5; # Energy equivalent of 1 amu, MeV
m_n = 1.008665; # Mass of the neutron, amu
m_p = 1.007825; # Mass of the proton, amu
M_He = 4.002870; # Mass of the heluim nucleus, amu
c = 3e+08; # Speed of light, m/s
#Calculations
BE = (2*m_n+2*m_p - M_He)*amu; # Binding energy for the alpha particle, MeV
#Result
print "The binding energy for the alpha particle = %2d MeV"%BE
```

In [29]:

```
#Variable declaration
print "Values of Z for different values of A are:"
for A in range(7,11):
Z = A/(2+0.015*A**(2./3))
print round(Z,2),
print "\n\nSince 4.36 is closer to 3, 4Be9 is more stable"
```

In [13]:

```
#Variable declaration
from sympy import *
c2 = Symbol('c2')
#Calculations
#For N14O17
Q1 = (14.00753+4.00206)*c2-(17.00450+1.00814)*c2
print "Since, Q = ",Q1, "which is negative, the reaction is endothermic"
#For Li7He4
Q2 = (7.01822+1.00814)*c2-(4.00206+4.00206)*c2
print "Since, Q = ",Q2, "which is negative, the reaction is endothermic"
#Answers differ due to rounding-off errors in Sympy
```

In [14]:

```
#Variable declaration
mp = 1.00814 #amu
mn = 1.00898 #amu
Mp = 30.98356 #amu
Msi = 30.98515 #amu
#Calculations
Q = Mp+mn-Msi-mp #amu
Q = Q*931.5 #MeV
Eth = Q*(-(Mp+mn)/Mp)
#Result
print "Threshold frequency = %.3fMeV"%Eth
#Rounding-off error
```

In [38]:

```
#Variable declaration
Q = -7.6342 #MeV
Mp = 19.0457 #amu
mi = 1.0087 #amu
me = 1.00728 #amu
Ki = 15
#calculations
Ke = (Q*Mp-(mi-Mp)*Ki)/(me+Mp)
Eth = Q*(-(Mp+mn)/Mp)
#Result
print "Kinetic energy of protons = %.3f MeV"%Ke
print "Threshold frequency = %.3f MeV"%Eth
```

In [39]:

```
#Variable declaration
e = 1.6e-019; # Energy equivalent of 1 eV, J/eV
N_A = 6.023e+023; # Avogadro's number
E_f = 200*1e+06*e; # Energy released per fission, J
#Calculations
E_mol = E_f*N_A; # Energy released by one mole of U235, J
E = E_mol*1000/235; # Energy released by the fission of 1 kg of U235, J
#Result
print "The Energy released by the fission of 1 kg of U235 = %4.2e kWh"%(E/(1000*3600))
```

In [40]:

```
#Variable declaration
e = 1.6e-019; # Energy equivalent of 1 eV, J/eV
E = 3.2e+07; # Energy released per second by the reactor, J
#Calculations
E_f = 200*1e+06*e; # Energy released per fission, J
N = E/E_f; # Number of fissions per second of U235, per second
#Result
print "The number of U235 atoms undergoing fissions per second = %1.0e"%N
```

In [41]:

```
#Variable declaration
e = 1.6e-019; # Energy equivalent of 1 eV, J/eV
N_A = 6.023e+026; # Avogadro's number, per kmol
P = 2; # Power produced by the fission of U235, watt
#Calculations
E_f = 200*1e+06*e; # Energy released per fission, J
FR = P/E_f; # Fission rate of U235, fission/sec
N = 0.5/235*N_A; # Number of U235 nuclei in 0.5 kg of U235
E = 200*N; # Energy released in the complete fissioning of 0.5 kg of U235, MeV
#Results
print "The fission rate of U235 = %4.2e fissions/sec"%FR
print "The energy released in the complete fissioning of 0.5 kg of U235 = %1.0e kcal"%(E*1e+06*e/(1000*4.186))
```

In [44]:

```
from math import *
#Variable declaration
e = 1.6e-019; # Energy equivalent of 1 eV, J/eV
R_max = 0.6; # Radius of two dees of the cyclotron, m
B = 1.6; # Strength of pole pieces of the cyclotron, tesla
# For proton
m = 1.67e-027; # Mass of the proton, kg
q = 1.6e-019; # Charge on a proton, C
#Calculations&Result
E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the proton, MeV
f_proton = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the proton, MHz
print "Energy of the proton = %5.2f MeV"%E
print "Cyclotron frequency for proton = %5.2f MHz"%f_proton
# For deuteron
m = 2*1.67e-027; # Mass of the deuteron, kg
q = 1.6e-019; # Charge on a deuteron, C
E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the deuteron, MeV
f_deuteron = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the deuteron, MHz
print "Energy of the deuteron = %5.2f MeV"%E
print "Cyclotron frequency for deuteron = %5.2f MHz"%f_deuteron
# For alpha-particle
m = 4*1.67e-027; # Mass of the alpha-particle, kg
q = 2*1.6e-019; # Charge on a alpha-particle, C
E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the deuteron, MeV
f_alpha = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the alpha-particle, MHz
print "Energy of the alpha-particle = %5.2f MeV"%E
print "Cyclotron frequency for alpha-particle = %5.2f MHz"%f_alpha
```

In [60]:

```
from math import *
#Variable declaration
e = 1.67e-013; # Energy equivalent of 1 eV, J/eV
R_max = 0.75; # Radius of two dees of the cyclotron, m
f = 15e+06; # Frequency of alternating potential, Hz
m = 1.67e-027; # Mass of the proton, kg
#Calculations
# As E = 1/2*q^2*R_max^2*B^2/(m*e) and f = q*B/(2*%pi*m), solving for E
E = (2*pi**2*m*f**2*R_max**2)/(e);
#Result
print "Energy of the protons issuing out of the cyclotron = %6.4f MeV"%E
#Incorrect answer in the textbook
```

In [46]:

```
from math import *
#Variable declaration
e = 1.6e-019; # Charge on an electron, C
c = 3e+08; # Speed of light, m/s
B_orbit = 0.5; # Magnetic field at the orbit of the betatron, T
f = 60; # Operating frequency of the betatron, Hz
#Calculations
omega = 2*pi*f; # Angular frequency of operation, rad/s
r = 1.6/2; # Radius of stable orbit, m
K_av = 4*omega*e*r**2*B_orbit/1.6e-019; # Average energy gained by the electron per turn, eV
K_max = c*e*r*B_orbit/1.6e-019; # Maximum energy gained by the eectron, eV
#Results
print "The average energy gained by the electron per turn = %5.1f eV"%K_av
print "The maximum energy gained by the electron = %5.1e eV"%K_max
```

In [63]:

```
#Variable declaration
q = 1.6e-019; # Charge on a deuteron, C
amu = 931.5; # Energy equivalent of 1 amu, MeV
m0 = 2.0141; # Rest mass of a deuteron, kg
B0 = 1.5; # Magnetic field at the centre of the synchrocyclotron, T
B = 1.431; # Magnetic field at the periphery of the synchrocyclotron, T
#Calculations
f0 = q*B0/(2*3.14*m0*1.67e-027*1e+06); # Maximum frequency of Dee voltage of synhrocyclotron, MHz
f = 1e+07; # Minimum frequency of Dee voltage, Hz
m = (q*B)/(2*3.14*f*1.67e-027); # Mass of deuteron at the periphery of the Dee, amu
K = (m-m0)*amu; # Gain in energy of the deuteron, MeV
#Results
print "The maximum frequency of Dee voltage = %5.2f MHz"%f0
print "The gain in energy of the deuteron = %6.2f MeV"%K
#Incorrect answer in textbook
```

In [49]:

```
from math import *
#Variable declaration
V = 1000; # Operating voltage of the GM counter, volt
a = 1e-04 # Radius of GM counter wire, m
b = 2e-02; # Radius of cathode, m
#Calculations
E = V/(2.3026*a*log10(b/a)); # Maximum radial field at the surface of central wire of GM tube, V/m
tau = 1e+09; # Life time of GM tube, counts
N = tau/(50*60*60*2000); # Life of the GM counter, years
#Results
print "The maximum radial field at the surface of central wire of GM tube = %4.2e V/m"%E
print "The life of the GM counter = %4.2f years"%N
```

In [50]:

```
from math import *
#Variable declaration
I = 15.7; # Ionization potential of argon in GM counter, volt
a = 0.012/2*1e-02; # Radius of GM counter wire, m
b = 5./2*1e-02; # Radius of cathode, m
lamda = 7.8e-006; # Mean free path of argon in GM counter, m
#Calculations
# As E*lambda = I = V*lambda/(2.3026*a*log10(b/a)), solving for V
V = 2.3026*a*I*log10(b/a)/lamda; # Voltage that must be applied to produce an avalanche in GM tube, volt
#Result
print "The voltage that must be applied to produce an avalanche in GM tube = %6.2f volt"%V
```

In [51]:

```
#Variable declaration
count_err = 1e-03; # Fractional error in counting
m = 3; # Plateau slope
#Calculations
delta_V = count_err*100/m*100; # Maximum permissible voltage fluctuation in a GM counter, volt
#Result
print "The maximum permissible voltage fluctuation in a GM counter = %3.1f volts"%delta_V
```