I've read through How to deal with an incompetent colleague?, but my situation is slightly different.
I am an intern1 (although close to graduation) working in Software Engineering. I work in a small team with only a few other people on a small project. The project is not that important to the main workload and thus we are not under any kind of time pressure. Despite this, I am still trying my best to make a good impression with both my colleagues (who are all full time employees) and the company as a whole which includes finishing features (fully tested and implemented) in a timely fashion.
My problem arises in that one of my coworkers is not a good programmer at all. Although they are highly intelligent, programming doesn't seem to click for them and they struggle writing the most basic of code.
As an example, when I pair program with this person to try and help them with a feature, I may prompt them and say something along the lines of "now we need to do something with every item in that array" and they can't understand we need to create a simple loop or form basic syntax or even generate pseudo-code from english like
foreach element in array print element
This person did not originally have a programming background, has been with the company for around a year, and does not seem to have made any progress towards mastering concepts a first semester computer science student would be expected to know, despite taking classes online.
Although not in my job description, I feel obligated to help them and try to teach them when they need it (which is most of the time) both out of desire for our project to move forward and simply because they are really nice and I like helping out. At the end of each day that I have worked with them, I feel mentally drained from attempting to teach them as well as get my own work done. We move very slowly through their feature (which they have been working on for about 2 weeks now, although I could have done it myself in a few hours) because I am trying to make sure they understand everything in the code and how to actually program when we work together and they accomplish nothing when I am not helping.
I have considered several options; however, my lack of experience means I really have no idea how to handle this. Should I talk with our team lead2? I feel that they must understand my coworker is not doing well, and they are kind of dragging me down. Should I refuse to help them, in order to get my own work done? or is there some other course of action that would be best for me to take?
1) I have about 6-7 weeks left in the internship. My end date is flexible. I would consider working there in the future (maybe not right after graduating but would like to leave the door open).
2) As a clarification, our team lead is another Software Engineer and not management. We all share a single manager higher up the food chain.