In [2]:

```
RH=1.097*10**7 #Rydberg constant in per meter
lamda=4/(3*RH)
c=3*10**8 # m/sec
f=c/lamda
print "Wavelength of the emitted photon = %0.2e meters"%lamda
print "frequency of the emitted photon = %0.2e meters"%f
```

In [5]:

```
from __future__ import division
RH=1.097*10**7 #Rydberg constant in per meter
h=6.626*10**-34 #plancks constant in j.s
c=3*10**8 # velocity of light in m/s
nf=2 #quantum number
ni=3# quantum number
#assuming k=1/lamda
k=RH*((1/nf**2-1/ni**2))
lamda=1/k
print "longest wavelength that photon emmited = %0.2e meters"%lamda
E_photon=h*c/lamda
print "Energy emmited by the photon = %0.2e Joules"%E_photon
```

In [7]:

```
Z=2 #atomic number of helium
n=1 #principal quantum number
E=-Z**2*13.6/n**2
print "a) Energy of the atom in ground state = %0.2f eV"%E
r=(n**2/Z)*0.0529#in nm
print "b) Radius of the ground state orbit = %0.3f nm"%r
```

In [8]:

```
n=2# principal quantum number
E=-13.6/n**2
print "Energy of the states with quantum number 2 = %0.2f ev"%E
```

In [10]:

```
Z=74 #atomic number of tungsten
Eo=13.6 #ground state enenrgy in ev
E_K=-(Z-1)**2*(13.6) #Energy of the electron in K shell
n=3
Z_eff=Z-n**2
E3=Eo/n**2
E_M=-Z_eff**2*E3
E=E_M-E_K
print "Energy of the characteristic emiited from tungsten target when electron drops from M shell to K shell = %0.2e ev"%E
#Difference in answer is because of roundoff
```