Question: what part of the computer hardware only retains data while the computer is on
Answer: random - access memory ( RAM )