Reset Manipulation in Learning Code W/O Losing code

I am almost though the section. I have restarted several times because the program seems to freeze. I only have two more lessons to learn, but the program won’t take me where I need to go without resetting and losing everything up to this point. Is there a way to reset the program without losing all the work? I guess I could copy and paste. It just seems a bit laborious. Does the program have a limited number of lines it will accept before it freezes?