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.
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.
After I pointed out what the error was and occurred at which line number, ChatGPT was able to correct it.
I was curious to know if the chat bots can write code as well as debug code. So, I put OpenAI ChatGPT, Google Bard, and Microsoft Bing AI Chat to the test. The question I asked: "Write a recursive function in Python that compares two lists of integers and returns…
I was curious to know if the chat bots can write code as well as debug code. So, about two weeks ago I put OpenAI ChatGPT, Google Bard, and Microsoft Bing AI Chat to the test. The question I asked: "Write a recursive function in Python that compares two lists…
In this video, we'll refactor a previous assignment written using procedural code into using functions and loops. This walk through is tedious work but hopefully it will help beginning programmer understand the process and logic behind eliminating code redundancy and reusability. https://youtu.be/TsLAY-xPeZ8