Encourage student to participate without him helping too much I am teaching two students (X and Y) to program in python.  X is a little bit quicker than the Y in grasping the concepts.  He likes to help Y figure out what to do with his code, why it isn't working etc.  He is very well meaning, but I would like Y to do the work himself. Y is definitely capable of doing it on his own and he will gain a lot more that way.  On the other hand it is good to have some interaction between them since discussing issues makes things a lot clearer and more enjoyable.  They are both 13 years old.  Cheating is not an issue since it is at camp and is not graded.

How do I discourage X from helping Y without making him feel like he did something wrong, and without discouraging him from participating in the future?
You can have some tasks where they each do the same thing (as you've been doing), but also some tasks where they need to do different things.  For example, have them write different functions that are both necessary in a larger program.  If you choose the tasks carefully, X will be too busy with his own work to meddle with Y's.