Helium
electronic configuration: 1s2
Beryllium
electronic configuration: 1s2 2s2
The number of electrons in valence shell of both the elements is same, however the valence shell is not same. Helium valence shell is 1s, which is most penetrated shell means it is very near to the nuclues and experiences highest force of attraction. The electrons are tightly held and do not take part in reactions to form any compounds, hence helium is noble. Whereas beryllium valence shell is 2s, though it also near to nucleus but still the electrons can take part in reactions to form covalent compounds.