The answer to why chlorine has an atomic weight of 35.5 not 35 is because of something called isotopes.
Isotopes are atoms with the same number of protons (in the case of chlorine that means 17 protons) but different numbers of neutrons. Chlorine has two common isotopes, Chlorine-35 and Chlorine-37.
Chlorine-35 has 17 protons and 18 neutrons and occurs in nature about 75% of the time. Chlorine-37 has 17 protons and 20 neutrons and occurs in nature about 25% of the time. That means that in any mixture of pure chlorine that can be isolated from all other elements there is 75% Chlorine-35 and 25% Chlorine-37. So, when the mass of chlorine is measured using an instrument called a mass spectrometer the result is a mass of 35.5. The atomic weight, or as it is properly called,
the RELATIVE atomic mass, is a weighted average of the masses of all the isotopes of chlorine.
Relative Atomic Mass = (75/100 x 35) + (25/100 x 37) = 35.5