In [2]:

```
from math import *
# Given
V1 = 40e3 # voltage in first case in V
V2 = 20e3 # voltage in second case in V
V3 = 100e3 # voltage in second in V
#Calculations
v1 = 0.593e6 * sqrt(V1)
lambda1 = 12400 / V1
v2 = 0.593e6 * sqrt(V2)
lambda2 = 12400 / V2
v3 = 0.593e6 * sqrt(V3)
lambda3 = 12400 / V3
#Results
print "Max. speed of electrons at %d Volts is %.3e m/sec\nMax. speed of electrons at %d Volts is %.2e m/sec/sec\nMax. speed of electrons at %d Volts is %.3e m/sec\nShortest wavelength of x-ray = %.2f A\nShortest wavelength of x-ray = %.2f A\nShortest wavelength of x-ray = %.3f A"%(V1,v1,V2,v2,V3,v3,lambda1,lambda2,lambda3)
```

In [3]:

```
# Given
V = 30e3 # voltage in V
lambda_min = 0.414e-10 # shortest wavelength in m
e = 1.6e-19 # charge on an electron in C
c = 3e8 # speed of light in m/sec
#Calculations
h = (e * V * lambda_min) / c
#Result
print "Planck constant is %.3e J sec"%h
```

In [4]:

```
# Given
V = 25e3 # voltage in V
#Calculations
lambda_min = 12400 / V
#Result
print "Minimum wavelength of x-ray is %.3f A"%lambda_min
```

In [5]:

```
from math import *
# Given
V = 13.6e3 # voltage in V
#Calculations
v = 0.593e6*sqrt(V)
#Result
print "Maximum speed of electron is %.2e m/sec"%v
```

In [6]:

```
from math import *
# Given
V = 10e3 # voltage in V
i = 2e-3 # current in amp
#Calculations
v = 0.593e6*sqrt(V)
#Result
print "Velocity of electron is %.2e m/sec"%v
```

In [9]:

```
# Given
V = 9.8e3 # voltage in V
i = 2e-3 # current in amp
c = 3e8 # speed of light in m/sec
#Calculations
lamda = 12400 / V
f = c / (lamda*10**-10)
#Results
print "Highest frequency is %.2e Hz\nMinimum wavelength is %.2f A"%(f,lamda)
```

In [10]:

```
from math import *
# Given
V = 12.4e3 # voltage in V
i = 2e-3 # current in amp
e = 1.6e-19 # charge on an electron in C
#Calculations
n = i / e
v = 0.593e6*sqrt(V)
#Result
print "Number of electrons striking the target per sec is %.2e\nSpeed of electrons is %.1e m/sec"%(n,v)
```

In [11]:

```
# Given
V = 10e3 # voltage in V
i = 15e-3 # current in amp
e = 1.6e-19 # charge on an electron in C
#Calculations
n = i / e
lamda = 12400 / V
#Results
print "Number of electrons striking the anode per sec is %.2e\nMinimum wavelength produced is %.2f A"%(n,lamda)
```

In [13]:

```
# Given
V = 50e3 # voltage in V
i = 1e-3 # current in amp
e = 1.6e-19 # charge on an electron in C
#Calculations
n = i / e
#Result
print "Number of electrons striking the anode per sec is %.2e"%n
```

In [15]:

```
# Given
lambda1 = 40e-12 # minimum wavelength in first case in m
lambda2 = 1e-10 # minimum wavelength in second case in m
#Calculations
V1 = 12400e-10 / lambda1
V2 = 12400e-10 / lambda2
#Results
print "Applied voltage to get wavelength of %.e meter is %.f KV\nApplied voltage to get wavelength of %.e meter is %.1f KV"%(lambda1,V1/10**3,lambda2,V2/10**3)
```

In [16]:

```
# Given
V1 = 44e3 # voltage in first case in V
V2 = 50e3 # voltage in second case in V
lambda1 = 0.284e-10 # shortest wavelength in first case in m
lambda2 = 0.248e-10 # shortest wavelength in second case in m
e = 1.6e-19 # charge on an electron in C
c = 3e8 # speed of light in m/sec
#Calculations
h1 = e * V1 * lambda1 / c
h2 = e * V2 * lambda2 / c
#Results
print "Planck constant is %.2e J sec if shortest wavelength is %.3e m \nPlanck constant is %.3e Jsec if shortest wavelength is %.3e m "%(h1,lambda1,h2,lambda2)
```

In [14]:

```
# Given
lamda = 1e-11 # K-absorption limit for uranium in m
#Calculations
V = 12400e-10 / lamda
#Result
print "Excitation potential is %d kV"%(V/10**3)
```

In [17]:

```
# Given
lamda = 1.4e-11 # K-absorption edge for lead in m
V = 88.6e3 # minimum voltage required for producing k-lines in V
c = 3e8 # speed of light in m/sec
#Calculations
r = V * lamda / c
#Result
print "The value of the ratio of h/e = %.3e Jsec/C"%r
```

In [18]:

```
# Given
Z = 92 # atomic no. of atom
Rh = 1.1e5 # Rydberg constant in cm^-1
c = 3e8 # speed of light in m/sec
#Calculations
lamda = 1 / (Rh *(Z-1)**2 * (1 - (1 / 2**2)))
#Result
print "Wavelength of K line = %.2f A"%(lamda*1e8)
```

In [19]:

```
# Given
Z = 42 # atomic no. of Mo
lamda = 0.71e-10 # wavelength in m
Z_ = 29 # atomic no. of Cu
#Calculations
lambda_ = (Z-1)**2 * lamda / (Z_-1)**2
#Result
print "Wavelength of the corresponding radiation of Cu is %.2f A"%(lambda_*1e10)
```

In [20]:

```
# Given
Z = 79 # atomic no. of element
b = 1 # a constant
a = 2.468e15 # a constant in per sec
c = 3e8 # speed of light in m/sec
#Calculations
f = a * (Z - b)**2
lamda = c / f
#Result
print "Wavelength of x-ray is %.4f A"%(lamda*1e10)
```

In [22]:

```
# Given
Z = 29 # atomic no. of Cu
R = 1.097e7 # Rydberg constant in m^-1
c = 3e8 # speed of light in m/sec
h = 6.62e-34 # Planck constant in J sec
#Calculations
f = 3./4 * (R * c) * (Z-1)**2
E = h * f / 1.6e-16
E_L = 0.931 # let E_L = 0.931 KeV
E_ = E + E_L
#Result
print "Ionization potential of K-shell electron of Cu is %.3f keV"%E_
```

In [23]:

```
# Given
Z = 79 # atomic no. of anticathode
R = 1.097e7 # Rydberg constant in m^-1
c = 3e8 # speed of light in m/sec
#Calculations
f = 3./4 * (R * c) * (Z-1)**2
#Result
print "Frequency of k line is %.3e Hz"%f
```

In [24]:

```
# Given
Z = 27 # atomic no. of Co
R = 1.097e7 # Rydberg constant in m^-1
c = 3e8 # speed of light in m/sec
h = 6.62e-34 # Planck constant in J sec
#Calculations
f = 3./4 * (R * c) * (Z-1)**2
E = h * f
lamda = c / f
#Results
print "Energy is %.2f keV\nWavelength of x-ray is %.2f A"%(E / 1.6e-16,lamda*1e10)
```