do metals lose or gain valence electrons code example Example: do nonmetals lose electrons Nonmetals: + Metals: -