Buggy Python Script Debugging Prompt
From Wikiprompt, the free prompt encyclopedia
Buggy Python Script Debugging Prompt A prompt asking an AI to identify and fix errors in a Python factorial function, and explain the corrections.
Prompt ContentSave
🌐
Below is a buggy Python script. Find the errors, fix them, and explain what was wrong:
python
CopyEdit
def factorial(n): if n = 1 return 1 else return n * factorial(n-1) print(factorial(5))
Sign in to see the full prompt
Continue with:
By logging in, you agree to our Terms of Use and Privacy Policy
Usage
This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.
For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.
References
- Category: coding Prompts
- Source: https://x.com/thisdudelikesAI/status/1894648180605948370
Talk
0 comments