Code not saving



When I started learning python, all the code that I typed were saved , but since I started learning “Function” , all the code that I typed couldn’t be saved. When I finished an exercise then I came back to the previous number, all the codes that I typed were deleted. I have a same issue for all the next lessons.
I don’t know what the problem is. Can anyone tell me what the problem is?

Thank you


Not exactly sure why that is happening, I just checked my previous exercises to see if they
were still there and they currently are. One thing that might reset your progress is resetting the exercise
or possibly clicking on the solution. Those happen to be the only 2 things I can think of that would
reset all of your progess. That or also unlikely, but may be possible depending on the setup of your
browser, if you happen to of changed settings or started using a different one?


I’ve found that many of the modules I completed in the past have been wiped clean. No telling what happened but I’ve since become convinced that lessons are not a safe place to leave code. Copy your exercises and save them on your machine to be sure you’ll still have them for review.


Definitely a good habbit. Especially if you want to add onto them or adjust them later. As a good practice I save everything in a text editor incase I have the need to come back to it later or possibly run it inside of a terminal.


I test a lot of inline code in the shell, and save as the whole thing with the date and a hint of the contents. There have been times when these files came in handy. I never close the shell without first saving it. You just never know.

During the Python course it is almost a must to have a shell of some sort open that you can test lines of code in. I do this all the time just to refresh syntax or see the outcome first hand.The barebones Python with IDLE from their site is as good a place to start as any.

Open the shell, click File > New File, then copy the code from the lesson and paste it in. Save it in a folder that matches the course name, within a folder of the module name and give the file the lesson name.


This way you can run a quick search of your cc folder and find any lesson you want. Wish I’d done this years ago. Hindsight is 20-20.


Ok . Thank you very much everyone~ :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.