If an atom of any element gained energy, does it always mean that its electrons gain energy too?

My book says ;
"The transitioning of electrons in atoms from one energy level to another is associated with changes in the energy of the atom."
But it hasn't made it clear whether or not the gaining of energy (of any form) by an atom will mean that the electrons are now at a higher energy level than before.




No, as atoms can for instance gain (or lose) kinetic energy as a whole and this does not influence the (pure) electronic states of the atom. The electrons may be excited to a higher energy level when the energy that is applied to the atoms (e.g. light or collisions with fast electrons) matches the energy gap between the current level and an excited level. For molecules, energy can also be trnsferred to rotation and/or vibration of the nuclei. 


On a side note, atoms can also have excited *nuclei* (carbon has for instance an excited nuclear state around 7.4 MeV that is very important for the [formation of carbon in the Universe](https://en.wikipedia.org/wiki/Triple-alpha_process)).


 0