Unfortunately, a $400 budget won't get you very far. There are lots of decent laptops that you may purchase for work, but for gaming, a decent gaming laptop will set you back by at least $900-$1200. I personally use the 2013 Razer Blade for my school and gaming, but that laptop cost me $2799, and honestly, I would rather have used $2000 to build a gaming rig, and the remaining $799 on a decent laptop for school. So my suggestion to you would be to save up for a larger budget, and buy a decent gaming laptop, instead of attempting to find a bottom of the barrel one.
I recommend the ASUS ROG GL551JW-DS71
http
/thewirecutter.com/reviews/the-best-budget-gaming-laptop-so-far/