Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +5 -2
prompts.py
CHANGED
@@ -119,14 +119,17 @@ Good Answer Example:
|
|
119 |
|
120 |
* The following is the complete prompt demonstrating how to generate Python code for converting temperatures between different scales within a specific range:
|
121 |
+ Task: Given input parameters min\_fahr and max\_fahr representing the minimum and maximum Fahrenheit temperatures respectively, generate a Python program which takes those limits and prints a table showing both corresponding Fahrenheit and Celsius temperatures side-by-side.
|
122 |
-
+ Complete Prompt: `You are an autonomous AI agent specialized in generating Python code; your duty is to construct a Python program that accepts minimum and maximum Fahrenheit temperatures and outputs their equivalent Celsius values in a tabular form. To accomplish this task, use the formula (F° - 32) × 5/9 = 0°C to convert Fahrenheit to Celsius. For proper output representation, apply appropriate string formatting techniques. Ensure the generated program includes necessary error handling and boundary checks where applicable. Use the following template:`
|
|
|
|
|
|
|
123 |
min_fahr = # Specify minimum Fahrenheit limit
|
124 |
max_fahr = # Specify maximum Fahrenheit limit
|
125 |
print(f"{'Fahrenheit':^8} {'Celsius':^7}")
|
126 |
for fahr in range(min_fahr, max_fahr + 1):
|
127 |
celsius = (fahr - 32) * 5 / 9
|
128 |
print(f"{fahr: ^8.2f}{celsius: ^7.2f}")
|
129 |
-
```
|
130 |
|
131 |
URLs Referenced:
|
132 |
|
|
|
119 |
|
120 |
* The following is the complete prompt demonstrating how to generate Python code for converting temperatures between different scales within a specific range:
|
121 |
+ Task: Given input parameters min\_fahr and max\_fahr representing the minimum and maximum Fahrenheit temperatures respectively, generate a Python program which takes those limits and prints a table showing both corresponding Fahrenheit and Celsius temperatures side-by-side.
|
122 |
+
+ Complete Prompt: `You are an autonomous AI agent specialized in generating Python code; your duty is to construct a Python program that accepts minimum and maximum Fahrenheit temperatures and outputs their equivalent Celsius values in a tabular form. To accomplish this task, use the formula (F° - 32) × 5/9 = 0°C to convert Fahrenheit to Celsius. For proper output representation, apply appropriate string formatting techniques. Ensure the generated program includes necessary error handling and boundary checks where applicable. Use the following template:`
|
123 |
+
|
124 |
+
```makefile
|
125 |
+
|
126 |
min_fahr = # Specify minimum Fahrenheit limit
|
127 |
max_fahr = # Specify maximum Fahrenheit limit
|
128 |
print(f"{'Fahrenheit':^8} {'Celsius':^7}")
|
129 |
for fahr in range(min_fahr, max_fahr + 1):
|
130 |
celsius = (fahr - 32) * 5 / 9
|
131 |
print(f"{fahr: ^8.2f}{celsius: ^7.2f}")
|
132 |
+
```References: https://docs.python.org/3/library/functions.html#range, https://realpython.com/lessons/string-formatting/
|
133 |
|
134 |
URLs Referenced:
|
135 |
|