Double the Human Resource Machine and its sequel - while they are puzzles, you still learn the flow of algorithms pretty well (however, they arent something, you would suggest to 7 years old - while they all begin slowly, difficulty escalates quickly and, if you arent man of math, you may get stuck soon).
Games by Zachtronics (except for, maybe, Opus Magnum) are more complex and less newbie-friendly, while still serve the purpouse, you've asked about. Good - indeed, but damn difficult to begin with.
There is also a Hacknet, but thats a bit of different beast - its closer to the system administration, than programming.
Also - kind of offtop, but, depending on age of person, you want to wololo into this religion, you can learn programming during making of your own games.
Gamemaker is awesome for such purpouse (didnt try GMS, but GM8 was my entry point), as said above. Or you can try some easy languages like python or lua