The time constraint is tough. If I only had a few minutes to give kids the flavor of programming I'd try something based on robot puzzle-style games (see below).
You'd draw a simple robot puzzle on the board with a few simple move symbols and have kids try to solve it. Use a cute dog or robot picture on cardboard with tape on the back as your player/avatar. "How would you get the dog to the bone with only these moves?"
While not as direct or effective, if you want an "algorithmic" magic trick, a fun one is the Kruskal count. It shows how you can predict exactly where the spectator's "random" moves will end up.
You'd draw a simple robot puzzle on the board with a few simple move symbols and have kids try to solve it. Use a cute dog or robot picture on cardboard with tape on the back as your player/avatar. "How would you get the dog to the bone with only these moves?"
Robozzle - React port of original Flash game https://alexanderson1993.github.io/robozzle-react/?level=-1
Lightbot - iOS/Android app https://lightbot.com/
While not as direct or effective, if you want an "algorithmic" magic trick, a fun one is the Kruskal count. It shows how you can predict exactly where the spectator's "random" moves will end up.
https://faculty.uml.edu/rmontenegro/research/kruskal_count/k...