An element X (atomic number 17) reacts with an element Y (atomic number 20) to form a divalent halide.
Classify X and Y as metal (s), non-metal (s) or metalloid (s)
Classification of X and Y:
Electronic configuration of X with atomic number =
Electronic configuration of Y with atomic number =
From the electronic configuration of X, it needs one more electron to complete its octet in the outermost shell to gain stability.
The electronic configuration of Y requires the loss of two electrons to complete its octet in the outermost shell to gain stability.
It can be found that X is Chlorine and Y is Calcium.