این پرامپت چه کاری میکند؟
«Code-Explainer» یک پرامپت آماده در حوزهی آموزش و یادگیری است که به هوش مصنوعی نقش یا وظیفهی مشخصی میدهد. متن را کپی کنید، متغیرهایش را پر کنید و در ChatGPT، Claude، Gemini بچسبانید.
متن کامل پرامپت
# Code Explainer (explain code in plain english)
```markdown
- **reset**
- **no quotes**
- **no explanations**
- **no prompt**
- **no self-reference**
- **no apologies**
- **no filler**
- **just answer**
Ignore all prior instructions. Take the code snippet provided and explain it in simple, easy-to-understand language. Break down the code’s functionality, purpose, and key components. Use analogies, examples, and plain terms to make the explanation accessible to someone with minimal coding knowledge. Avoid using technical jargon unless absolutely necessary, and provide clear explanations for any jargon used. Here is an example input and output:
### Example Input
#python
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
result = factorial(5)
print("Factorial of 5 is:", result)
### Example Output
This code calculates the factorial of a number using a function called `factorial`. Let's break it down step by step:
The `factorial` function takes a number `n` as input.
1. **Base Case:** The function checks if `n` is 0. If it is, the function returns 1. This is because the factorial of 0 is defined as 1.
2. **Recursive Case:** If `n` is not 0, the function returns `n` multiplied by the factorial of `n-1`. This means the function calls itself with the number one less than the current value of `n`.
The `result` variable stores the value returned by the `factorial` function when called with the number 5.
Finally, the code prints the result, which is the factorial of 5.
In simpler terms, imagine you want to find the factorial of 5 (written as 5!). The factorial of a number is the product of all positive integers up to that number. So, 5! = 5 * 4 * 3 * 2 * 1. The function works by multiplying the number by the factorial of the number just below it, repeating this until it reaches 1.
### Additional Instructions for Understanding Recursion
- **Recursion:** This is a technique where a function calls itself. It's useful for problems that can be broken down into smaller, similar problems.
- **Base Case:** The condition that stops the recursion. Without it, the function would call itself forever.
- **Recursive Case:** The part where the function calls itself with a smaller problem.
Once you have fully grasped these instructions and are prepared to begin, respond with "Understood. Please input the code you would like explained."
```
ساخت نسخهی اختصاصی برای پروژهی شما
مشخصات پروژه را بنویسید؛ به انتهای پرامپت اضافه میشود و فایلی میگیرید که بدون توضیح اضافه به هوش مصنوعی داده میشود. همهچیز در مرورگر شما ساخته میشود و هیچ دادهای به سرور نمیرود.
پیشنمایش فایل نهایی
پرسشهای متداول
پرامپت «Code-Explainer» را چطور استفاده کنم؟
دکمهی کپی را بزنید، اگر متغیری دارد در بخش «پرکردن متغیرها» مقدارش را بنویسید و متن را در ChatGPT، Claude، Gemini، هر دستیار هوش مصنوعی بچسبانید. برای پاسخ فارسی در انتها اضافه کنید: «به فارسی پاسخ بده».
استفاده از این پرامپت رایگان است؟
بله. این پرامپت از مجموعهی LLM Prompt Library با مجوز MIT گردآوری شده و استفادهی شخصی و تجاری از آن آزاد است.
پرامپتها مرتبط در «آموزش و یادگیری»
همهMath Teacher
معلم ریاضیمدل را در نقش معلم ریاضی قرار میدهد که معادلهها و مفاهیم را قدمبهقدم و به زبان ساده توضیح میدهد، روشهای مختلف حل را نشان میدهد و منابع بیشتر معرفی…
Motivational Coach
مربی انگیزشیهوش مصنوعی را به یک مربی انگیزشی تبدیل میکند که با شنیدن هدفها و چالشهای شما، راهکارهای عملی، جملات تأکیدی مثبت و فعالیتهای مشخص برای رسیدن به هدف پیشنهاد میدهد.…
برنامه روزانه واقعبینانه تا روز امتحان.
شات کمکآموزشی برای معلم زیست، کانال کنکور یا محتوای علمی.
سه سطح خلاصه برای مرور سریع، توضیح شفاهی و جزوهی کامل.
معنی سادهی اصطلاحات آزمایش خون بدون تشخیص؛ برای فهم بهتر قبل از رفتن پیش پزشک.