Good stuff and congrats. I'm always amazed to see young kids get into coding and math. I think that's awesome.
I was so pleasantly surprised when she got the whole variables thing. I think drawing analogies to real life stuff is a sure way to get kids engaged, especially if the props you use are toys. About the attention span - yeah I noticed my 5 (almost) year old wanted to try when he saw his sister having fun, but then he got bored after a couple of minutes.