-
Notifications
You must be signed in to change notification settings - Fork 4
/
update.txt
37 lines (29 loc) · 1.32 KB
/
update.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$import _intro.txt
Here is an example code that I have written. However, it is not working as expected.
```python
{{ code }}
```
I executed the code, but the performance was not very high. I got a score of {{ int(avg_score) }} where a good score is 500.
$begin
if printed:
print("There was a print message saying: {{ printed }}")
if exception:
print("""The code failed to run because there was an exception. The exception message was as follows: {{ exception }}""")
print("Resolving this exception is the top priority.")
else:
if {{ same_outputs }}:
print("It also seems that the code produces the same output of ```{{ outputs }}``` for all inputs, which is not the behaviour we want.")
$end
$begin
if feedback:
print("""{{ feedback }}""")
$end
Please do the following:
$begin
if exception:
print("Step 1. Look at the error message carefully and identify the reason why the code failed, and how it can be corrected.")
else:
print("Step 1. Given the example input and output, identify the reason why the code made a wrong prediction, and how it can be corrected to achieve a good score.")
$end
Step 2. Describe step by step what the code should do in order to achieve its task.
Step 3. Please rewrite the python function `{{ function_name }}` to achieve a higher score, including all necessary import statements.