How I helped ChatGPT Correct Its Code
April 1, 2023
How I helped ChatGPT correct its own code. ChatGPT provided me a Python code but it was syntically incorrect. I told and pointed out the exact syntax error, but it still failed to fix it. So I helped “it” correct it’s own code. Finally, it got it. See screenshots of transcript/conversation below.
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_code1-3-edited-1.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_code1a-edited-1.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_code2-edited.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_code3-edited.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_code4-edited.png)
Next, I wanted to double-check if ChatGPT is capable of catching the same syntax error. I used the same code that ChatGPT created and pretended that it was my code. Then I asked ChatGPT that there’s an syntax error in my code and I wanted to know if it can tell me where it is.
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_5-1024x497.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_6-1024x420.png)
![](http://www.christianhur.com/wp-content/uploads/2023/04/help_gpt_fix_7-1024x713.png)
After I pointed out what the error was and occurred at which line number, ChatGPT was able to correct it.