In [1]:

```
#given
w=4000.0 #Wavelength of the light in Angstrom units
wf=2.25 #Work function of potassium in eV
m=(9.1*10**-31) #Mass of the electron in kg
v=(3*10**8) #Velocity of light in m/s
c=(1.6*10**-19) #Charge of the electron in coloumbs
h=6.626*10**-34 #Plancks constant in Js
#Calculations
E=(h*v)/(w*10**-10*c)
KE=(E-wf)
#Output
print"Maximum kinetic energy of photoelectron is ",round(KE,3),"eV"
```

In [2]:

```
#given
wf=1.9 #Workfunction of the material in eV
w=3000 #Wavelength of the light in Angstrom units
v=(3*10**8) #Velocity of light in m/s
c=(1.6*10**-19) #Charge of the electron in coloumbs
h=6.626*10**-34 #Plancks constant in Js
#Calculations
V=(1/c)*(((h*v)/(w*10**-10))-(wf*c))
#Output
print"Stopping potential is ",round(V,2),"V"
```

In [3]:

```
#given
V=(70*10**3) #Accelerating potential in V
v=(3*10**8) #Velocity of light in m/s
c=(1.6*10**-19) #Charge of the electron in coloumbs
h=6.626*10**-34 #Plancks constant in Js
#Calculations
lmin=((h*v)/(c*V))/10**-9
#Output
print"Shortest wavelength of X-rays produced is ",round(lmin,4),"mm"
```

In [11]:

```
#given
w1=2 #Wavelength in Angstrom
Z1=24 #Target one
Z2=42.0 #Target two
a=1 #Constant value
#Calculations
w2=w1*(Z1-a)**2/(Z2-a)**2
#Output
print"Wavelength is ",round(w2,2),"Angstrom"
```

In [1]:

```
#given
w=3 #Wavelength of the light in Angstrom
v=(3*10**8) #Velocity of light in m/s
h=6.626*10**-34 #Plancks constant in Js
q=40 #Scattering angle in degrees
m=(9.11*10**-31) #Mass of electron in kg
c=(1.6*10**-19) #Charge of the electron in coloumbs
#Calculations
import math
dl=(h/(m*v))*(1-math.cos(q*3.14/180.0))/10.0**-10
l=(w+dl)
#Output
print"Wavelength of scattered X-rays is ",round(l,4),"Angstrom"
```