[ { "id": "inclusive_sum", "prompt": "The total_inclusive function excludes the final integer. Inspect calc.py and repair its return line using submit_patch.", "files": { "calc.py": "def total_inclusive(start, end):\n return sum(range(start, end))\n" }, "target_file": "calc.py", "expected_new_line": " return sum(range(start, end + 1))", "accepted_new_lines": [ " return sum(range(start, end + 1))" ] }, { "id": "filename_extension", "prompt": "The extension function returns the wrong component for names with multiple dots. Inspect files.py and repair its return line using submit_patch.", "files": { "files.py": "def extension(filename):\n return filename.split('.')[1]\n" }, "target_file": "files.py", "expected_new_line": " return filename.rsplit('.', 1)[-1]", "accepted_new_lines": [ " return filename.rsplit('.', 1)[-1]", " return filename.split('.')[-1]" ] }, { "id": "empty_average", "prompt": "The average function crashes on an empty list. Inspect stats.py and replace its return line so it returns 0.0 for an empty list. Use submit_patch.", "files": { "stats.py": "def average(values):\n return sum(values) / len(values)\n" }, "target_file": "stats.py", "expected_new_line": " return sum(values) / len(values) if values else 0.0", "accepted_new_lines": [ " return sum(values) / len(values) if values else 0.0" ] } ]