Former Robins defender Sean O'Hanlon headed a James Berrett cross past Wes Foderingham after 69 minutes to bring the visitors level before Pritchard produced the game's stand-out moment three minutes later.
The midfielder scored with a curling free-kick to put Swindon on the road to three points and remain one point off a play-off spot.
Substitute N'Guessan made sure of the win in injury time, netting with his only touch of the game after receiving a pass from Nile Ranger.
Cooper said: "Little Alex was excellent, scoring another free-kick, and Dany did well to come off the bench and seal it.
"We totally dominated the first part of the game and we scored an excellent goal. We played some really good stuff.
"The defending wasn't good enough from us at times but it was vitally important to get back in front as quickly as we could to help take the pressure off.
"Carlisle made it difficult for us and we had to be patient.
"There will be dips in form from us but we have to deal with that. The fans have been sensible and we are now starting to reward them."
- Sports & Recreation
- Wes Foderingham
- Massimo Luongo