The electronic configuration of the given elements is as follows :
E = 19 = 2, 8, 8, 1
F = 8 = 2, 6
G = 17 = 2, 8, 7
We observe that E has 1 electron in the outer most shell, hence it will try to lose it’s electron and attain a stable state. Therefore, it is a metal.
On the other hand, F and G will try to gain 2 and 1 electron respectively in order to attain a stable state. Hence, they are non-metals.