valence electrons for diffeent principle energy levels code example Example: do nonmetals lose electrons Nonmetals: + Metals: -