We have to know the reason of high electronegativity and ionization energy of an atom with 7 valence electrons and 2 energy levels has a high electronegativity and ionization energy.
The reason is: the atom is smaller in size and effective nuclear charge is more.
The atom having 2 energy levels and 7 valence electrons has atomic orbital electronic configuration as 1s²2s²2p⁵. The atom is smaller in size and it needs only one electron to gain noble gas electronic configuration.
It has higher tendency to attract electron towards itself as effective nuclear charge is more. So, highly electronegative.
Also, removal of electron from outermost shell is difficult as already 7 electrons are present and attraction between nucleus and outermost shell electrons is high. So, ionisationn energy is alos high.