I hope you can do your project while connected to the mains with an adapter, so you don't need the battery.
If it's hardware, it's either the battery or the motherboard. Replacing the motherboard probably is to expensive, replacing the battery is worth a try, especially if you can return it if it doesn't work.
To check if it's something else than hardware, you can do three things:
1. Reset the BIOS to defaults.
2. Boot from a Linux disc or stick (free to make) and see if it works then
3. Reinstall Windows from the recovery media that came with the laptop ("back to factory conditions").
The laptop I bought has served me for about 5 years. Now, Its at 9% and not charging. Whenever I unplug my laptop, it immediately shuts down. I went through many videos trying to fix this but nothing works for me. I can't even turn on my laptop without charging. My laptop is a Samsung R420. Its running Windows 10. Please answer as soon as possible as I have a project soon. Thank You.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic