What is the atomic number of an element which has 7 electrons in the M shell?
This means that K-shell and L-shell of the atom are completely filled. Now K-shell would have 2 electrons and L-shell would have 8 electrons.
So, total no. of electrons = 2 + 8 + 7= 17
Thus no. of protons = 17
∴
Atomic no. of the atom = 17.