Year 6, aged 11, we had a BBC computer and a "twenty questions" game on it, where you would think of an X and the computer would ask you Yes/No questions to guess it.

I could tell it was nothing magic, just a big flow chart switching on to the next possible questions based on binary answers. It had a make-your-own option, so I made one for the class' favourite 90s pop stars and footballers of the day, with a feature at the end that if it did not guess their chosen celeb, they could enter its name and it would save the decision branches that had led there.

I didn't quite understand what I was doing, and the software itself must have offered some guidance, but what was important was that I understood WHY it was working and what was happening behind the scenes.

Then RPGMaker in the early 2000s, whereby it took me a day or so to program all the possibilities of opening a chest, acquiring the prize (and thus removing it from the chest) and adding it to inventory - if there was space. If, if else, else...