A game that www.mrworkspace.nl/2020/09/05/managed-workspace-sessions-by-board-room/ lets players to experience software development is a great method to teach programming and coding concepts like loops and conditional statements. Games that allow this include Zachtronics Shenzhen I/O which puts players in the shoes of disaffected engineers working at a drab chip company and have to build computer chips by hand. The circuits they are asked to create become more complicated beginning with making the lights flash in a particular pattern.
The interface of the game is similar to the one is found in browsers, and it teaches scripting. Another great example is Screeps, which combines JavaScript coding with massively multiplayer online gameplay to build self-sustaining colonies. Both games are excellent at teaching basic concepts and slowly introducing new players.