Hello my name is***** am sorry you have encountered this kind of problem. There are two things that could be going on here the first either the power source is not delivering enough power to charge the battery and run the computer both which would mean a malfunctioning power supply or they gave you the wrong one when they gave it back to you or the battery is bad which would mean it would need to be replaced if the power supply itself is the wrong one or is failing or defective.
Janet - Do you need assistance? It looks like what Charles recommended above is correct, it is most likely the battery not holding the charge. What do you mean the question was repeated in the answer?