How do I reset my code?

Sometimes, you just want to start a problem from the beginning. You might have made a mistake in your code, or you might have completed the problem a long time ago and want to try it again. 

For most problems, you can simply to delete the code in the window manually. Just highlight the code and delete! This way, you'll still keep the history of your code, and your past submissions, which you can load at any time in the Submissions window (the bottom right section of your screen). 

What if the problem included prefilled code? 

Some of the problems on Grok include prefilled code or data files. In this case, deleting the code in your code editor won't help, because then you'll be missing the prefilled information!

In this case, use the Reset button. The Reset button is used to reset program.py to the original setting, but only in cases where program.py was not just a blank file. 

I'm a teacher and want to demo this problem to students

We often get questions from teachers about demonstrating a problem to students. You want to start from a blank code editor for your demo, but if you've already completed the problem, your saved code is in the code editor. 

Our recommendation is simply to delete the code in the window manually. Just highlight the code and delete! This way, you'll still keep the history of your code, and your past submissions, which you can load at any time in the Submissions window (the bottom right section of your screen). 

Still need help? Contact Us Contact Us