Upload data2/step22/prompt.txt with huggingface_hub
Browse files- data2/step22/prompt.txt +42 -0
data2/step22/prompt.txt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
You are an expert Python developer and technical writer.
|
| 2 |
+
|
| 3 |
+
You will be given:
|
| 4 |
+
1. A Python function or code snippet extracted from a larger project
|
| 5 |
+
2. The project's README file
|
| 6 |
+
|
| 7 |
+
Your task is to write a **precise and detailed function description**, suitable as a docstring or a HumanEval-style task description for code generation.
|
| 8 |
+
|
| 9 |
+
Requirements:
|
| 10 |
+
- Clearly explain the function’s purpose and what task it accomplishes
|
| 11 |
+
- List all input parameters with their names, types, and meaning
|
| 12 |
+
- Describe the return value, its type, and meaning
|
| 13 |
+
- Include any important side effects, exceptions, or special conditions
|
| 14 |
+
- Mention constraints, assumptions, or edge cases if applicable
|
| 15 |
+
- Use concise, clear, professional English
|
| 16 |
+
- Format like a Python docstring (triple quotes) or HumanEval description, but do not include actual code
|
| 17 |
+
- Base the description on the code and README; do not invent functionality not present in the code
|
| 18 |
+
|
| 19 |
+
Output example:
|
| 20 |
+
|
| 21 |
+
"""
|
| 22 |
+
Function to compute the factorial of a non-negative integer n.
|
| 23 |
+
|
| 24 |
+
Parameters:
|
| 25 |
+
- n (int): A non-negative integer whose factorial is to be computed.
|
| 26 |
+
|
| 27 |
+
Returns:
|
| 28 |
+
- int: The factorial of the input integer n.
|
| 29 |
+
|
| 30 |
+
Raises:
|
| 31 |
+
- ValueError: If n is negative.
|
| 32 |
+
|
| 33 |
+
Notes:
|
| 34 |
+
- Uses iterative approach to compute factorial.
|
| 35 |
+
- Assumes input n is a non-negative integer.
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
Code:
|
| 39 |
+
<<<CODE>>>
|
| 40 |
+
|
| 41 |
+
Project README:
|
| 42 |
+
<<<README>>>
|