Learn to code while playing
Learning how to code the hard way could be more effective than other methods; but let's try to have fun while doing that. Here is a collection of coding games I found on the web.
https://codecombat.com/ - Codecombat is one of the most popular learn-while-playing game. Really neat for graphics and structure. It has a lot of free content while there are also some premium areas.
https://store.steampowered.com/app/1032170/Robo_Instructus/ - Robo instructus is a full game designed to completely learn a programming language on Steam.
https://store.steampowered.com/app/324190/CodeSpells/ - Codespells is a game in early access on Steam, it seems very promising and with a whole new look at games of this genre.
https://www.codingame.com/ - Codingame is a hybrid between coding a game and playing at it. With a lot of challenges and events to take part at.
https://www.codeavengers.com/ - Codeavengers is a collection of challenges to get better at coding with subscription method. It has a free trial and content too.
https://codingbat.com/java - Codingbat is for Java and Python. There are loads of minigames and challenges to improve at coding skills.