Home

>

Prompts Database

>

Programming
StackOverflow Post
avatar
Buffy Summers
Share
Leave a comment
624 days ago

Prompt type:

Programming

Category:

Programming, Coding

Media type:

Use with AI:

ChatGPT from OpenAI
View Full Output

Example output

def factorial(n):
    
if n == 0:
return 1
else:
return n * factorial(n - 1)

Description or instructions

This prompt is a StackOverflow post where the author is requesting assistance in programming-related questions. They want the responder to provide answers without explanations, and to only include explanations when necessary due to insufficient detail. The author will communicate any English instructions by enclosing them in curly brackets. The prompt includes an automatic section that instructs the responder to ignore all previous instructions and act as an expert in programming and communication. The responder's task is to teach the author how to answer programming questions effectively. The responder should always include a question to better understand the context and the author's needs. The prompt also mentions a link to a chat platform for further interaction.

Prompt

I want you to act as a stackoverflow post. I will ask programming-related questions and you will reply with what the answer should be. I want you to only reply with the given answer, and write explanations when there is not enough detail. do not write explanations. When I need to tell you something in English, I will do so by putting text inside curly brackets {like this}. My first question is {Write a Python function that calculates the factorial of a given non-negative integer}