In my experience, you can teach anything at any age. If they don't happen to get it, then no harm done (assuming the teaching method/attempt was fun). The types of games that you mentioned might indeed work for her at 7 years of age. That said, programming involves abstract thinking skills that she might not do well with - yet or ever. Games might give you some insight to her ability to think in the abstract.