This app was mentioned in 7 comments, with an average of 4.43 upvotes
Lightbot - Programming Puzzles Their own description sums it up nicely. "A puzzle game that uses game mechanics that are firmly rooted in programming concepts."
Fun, well designed game. I was addicted to it and very much distracted by it until I made it through all the levels. I only wish they had more levels or another game that played in a similar fashion.
Sometimes I give to my students A Human Resource Machine ( https://en.m.wikipedia.org/wiki/Human_Resource_Machine ), it contains nice set of programming problems. Sadly it becomes hard fast. But it's nice to start. Other game I could advice is Lightbot ( https://play.google.com/store/apps/details?id=com.lightbot.lightbot ) - tested on 8yo girl, it had good reception. About programming itself there are books - Learn Program in Minecraft ( https://www.amazon.com/Learn-Program-Minecraft-Transform-Python/dp/1593276702# ) or Build Computer Games in Python ( https://books.google.pl/books/about/Invent_Your_Own_Computer_Games_with_Pyth.html?id=ZPneDQAAQBAJ&printsec=frontcover&source=kp_read_button&redir_esc=y ).
Sorry for bad formatting, I'll correct that as soon I'll go home.
teach them logic first.
games like this
https://play.google.com/store/apps/details?id=com.lightbot.lightbot&hl=en