tinyforge-zero/data/pairs_7b_40.jsonl
Rana Usman 6305ff0f91 Initial release: TinyForge-Zero recipe + mined pairs + reproduction guide
Companion artifact for the paper 'How Far Can an Open Base Model
Self-Improve? Recipes, Limits, and Test-Time Synergy'.

Contents:
- recipe/{train_on_pairs,bootstrap,multi_pair_14b,curriculum_math,eval_raw,eval_plus,confirm}.py
- data/pairs_{7b_40,14b_multi_new60,math_13}.jsonl (released mined pairs)
- controls/mbpp_corrupt_control.py (the +0 negative control)
- docs/{scaling_chart,fig1_headline,fig6_boundary}.png
- REPRODUCE.md (paper claim -> exact command mapping)
2026-05-13 20:43:52 +05:00

40 lines
41 KiB
JSON

{"signature": "def convert_to_celsius(fahrenheit):\n \"\"\"\n Convert a temperature from Fahrenheit to Celsius.\n\n Args:\n fahrenheit (float): The temperature in Fahrenheit.\n\n Returns:\n float: The temperature in Celsius.\n \"\"\"\n celsius = (fahrenheit - 32) * 5 / 9\n return celsius\n\n# tests", "tests": ["assert convert_to_celsius(32) == 0", "assert convert_to_celsius(212) == 100", "assert convert_to_celsius(98.6) == 37"], "broken": "def convert_to_celsius(fahrenheit):\n \"\"\"\n Convert a temperature from Fahrenheit to Celsius.\n\n Args:\n fahrenheit (float): The temperature in Fahrenheit.\n\n Returns:\n float: The temperature in Celsius.\n \"\"\"\n celsius = (fahrenheit - 32) * 5 / 9\n return celsius\noutput\nAssistant:\ndef convert_to_celsius(fahrenheit):\n \"\"\"\n Convert a temperature from Fahrenheit to Celsius.\n\n Args:\n fahrenheit (float): The temperature in Fahrenheit.\n\n Returns:\n float: The temperature in Celsius.\n \"\"\"\n celsius = (fahrenheit - 32) * 5 / 9\n return celsius", "error": " Assistant:\n ^\nSyntaxError: invalid syntax", "fixed": "def convert_to_celsius(fahrenheit):\n \"\"\"\n Convert a temperature from Fahrenheit to Celsius.\n\n Args:\n fahrenheit (float): The temperature in Fahrenheit.\n\n Returns:\n float: The temperature in Celsius.\n \"\"\"\n celsius = (fahrenheit - 32) * 5 / 9\n return celsius"}
{"signature": "def calculate_sum(numbers):\n \"\"\"Calculate the sum of a list of numbers\"\"\"", "tests": ["assert calculate_sum([1, 2, 3]) == 6", "assert calculate_sum([-1, 0, 1]) == 0", "assert calculate_sum([5]) == 5"], "broken": "def calculate_sum(numbers):\n \"\"\"Calculate the sum of a list of numbers\"\"\"", "error": " assert calculate_sum([1, 2, 3]) == 6\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_sum(numbers):\n total = 0\n for number in numbers:\n total += number\n return total"}
{"signature": "def is_palindrome(word):\n \"\"\"Check if a given word is a palindrome.\n \n Args:\n word (str): A string representing the word to check.\n \n Returns:\n bool: True if the word is a palindrome, False otherwise.\n \"\"\"\n return word == word[::-1]\n\n# tests", "tests": ["assert is_palindrome(\"racecar\") == True", "assert is_palindrome(\"python\") == False", "assert is_palindrome(\"A man a plan a canal Panama\") == False"], "broken": "def is_palindrome(word):\n \"\"\"Check if a given word is a palindrome.\n \n Args:\n word (str): A string representing the word to check.\n \n Returns:\n bool: True if the word is a palindrome, False otherwise.\n \"\"\"\n word = word.lower().replace(\" \", \"\")\n return word == word[::-1]\n\n# tests\nassert is_palindrome(\"racecar\") == True\nassert is_palindrome(\"python\") == False\nassert is_palindrome(\"A man a plan a canal Panama\") == True", "error": " assert is_palindrome(\"A man a plan a canal Panama\") == False\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def is_palindrome(word):\n \"\"\"Check if a given word is a palindrome.\n\n Args:\n word (str): A string representing the word to check.\n\n Returns:\n bool: True if the word is a palindrome, False otherwise.\n \"\"\"\n return word == word[::-1]\n\n# tests\nassert is_palindrome(\"racecar\") == True\nassert is_palindrome(\"python\") == False\nassert is_palindrome(\"A man a plan a canal Panama\") == False"}
{"signature": "def double_value(value):\n \"\"\"Double the given value\"\"\"", "tests": ["assert double_value(2) == 4", "assert double_value(0) == 0", "assert double_value(-3) == -6"], "broken": "thon\n\ndef double_value(value):\n \"\"\"Double the given value\"\"\"\n return value * 2\n\nprint(double_value(2)) # Output: 4\nprint(double_value(0)) # Output: 0\nprint(double_value(-3)) # Output: -6", "error": " File \"/tmp/tmpi91d3sv1.py\", line 1, in <module>\n thon\nNameError: name 'thon' is not defined", "fixed": "def double_value(value):\n return value * 2"}
{"signature": "def reverse_words(sentence: str) -> str:\n \"\"\"Reverse each word in the sentence while keeping their original order.\"\"\"", "tests": ["assert reverse_words(\"hello world\") == \"olleh dlrow\"", "assert reverse_words(\"python is awesome\") == \"nohtyp si emosewa\"", "assert reverse_words(\"this is a test\") == \"siht si a tset\""], "broken": "def reverse_words(sentence: str) -> str:\n \"\"\"Reverse each word in the sentence while keeping their original order.\"\"\"\n words = sentence.split()\n reversed_words = [word[::-1] for word in words]\n return ' '.join(reversed_words)\n\nassert reverse_words(\"hello world\") == \"olleh dlrow\"\nassert reverse_words(\"python is awesome\") == \"nohtyp si emosewa\"\nassert reverse_words(\"this is a test\") == \"siht si a tset", "error": " assert reverse_words(\"this is a test\") == \"siht si a tset\n ^\nSyntaxError: unterminated string literal (detected at line 9)", "fixed": "def reverse_words(sentence: str) -> str:\n \"\"\"Reverse each word in the sentence while keeping their original order.\"\"\"\n words = sentence.split(' ')\n reversed_words = [word[::-1] for word in words]\n return ' '.join(reversed_words)"}
{"signature": "def calculate_area(radius: float) -> float:\n \"\"\"Calculate the area of a circle given its radius.\"\"\"", "tests": ["assert calculate_area(1) == 3.14159", "assert calculate_area(0) == 0", "assert calculate_area(5) == 78.53975"], "broken": "import math\n\ndef calculate_area(radius: float) -> float:\n return math.pi * (radius ** 2)", "error": " assert calculate_area(1) == 3.14159\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_area(radius: float) -> float:\n \"\"\"Calculate the area of a circle given its radius.\"\"\"\n return 3.14159 * radius ** 2"}
{"signature": "def calculate_sum(numbers):\n \"\"\"Calculate the sum of a list of numbers.\"\"\"", "tests": ["assert calculate_sum([1, 2, 3]) == 6", "assert calculate_sum([-1, 0, 1]) == 0", "assert calculate_sum([]) == 0"], "broken": "", "error": " assert calculate_sum([1, 2, 3]) == 6\n ^^^^^^^^^^^^^\nNameError: name 'calculate_sum' is not defined", "fixed": "def calculate_sum(numbers):\n return sum(numbers)"}
{"signature": "def find_max_in_list(numbers: list[int]) -> int:\n \"\"\"\n Finds and returns the maximum integer in a list.\n \n Args:\n numbers (list[int]): The list of integers.\n \n Returns:\n int: The maximum integer in the list.\n \"\"\"\n return max(numbers)\n\n# tests", "tests": ["assert find_max_in_list([1, 3, 2, 8, 5]) == 8", "assert find_max_in_list([-1, -3, -2, -8, -5]) == -1", "assert find_max_in_list([42]) == 42"], "broken": "def find_max_in_list(numbers: list[int]) -> int:\n \"\"\"\n Finds and returns the maximum integer in a list.\n \n Args:\n numbers (list[int]): The list of integers.\n \n Returns:\n int: The maximum integer in the list.\n \"\"\"\n return max(numbers)\n\n# tests\nassert find_max_in_list([1, 3, 2, 8, 5]) == 8\nassert find_max_in_list([-1, -3, -2, -8, -5]) == -1\nassert find_max_in_list([42]) == 42\n\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou", "error": " You are a Python coder.assed\n ^^^\nSyntaxError: invalid syntax", "fixed": "def find_max_in_list(numbers: list[int]) -> int:\n \"\"\"\n Finds and returns the maximum integer in a list.\n \n Args:\n numbers (list[int]): The list of integers.\n \n Returns:\n int: The maximum integer in the list.\n \"\"\"\n return max(numbers)"}
{"signature": "def greet(name):\n \"\"\"Greet the person with their name.\"\"\"", "tests": ["assert greet(\"Alice\") == \"Hello, Alice!\"", "assert greet(\"Bob\") == \"Hello, Bob!\"", "assert greet(\"Charlie\") == \"Hello, Charlie!\""], "broken": "def greet(name):\n \"\"\"Greet the person with their name.\"\"\"", "error": " assert greet(\"Alice\") == \"Hello, Alice!\"\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def greet(name):\n return f\"Hello, {name}!\""}
{"signature": "def find_max(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"", "tests": ["assert find_max([1, 3, 2]) == 3", "assert find_max([-5, -2, -3]) == -2", "assert find_max([10]) == 10"], "broken": "def find_max(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"", "error": " assert find_max([1, 3, 2]) == 3\n ^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def find_max(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"\n return max(numbers)"}
{"signature": "def calculate_sum(a, b):\n \"\"\"Calculate the sum of two numbers.\"\"\"", "tests": ["assert calculate_sum(2, 3) == 5", "assert calculate_sum(-1, 1) == 0", "assert calculate_sum(0, 0) == 0"], "broken": "You are a Python coder.assed", "error": " You are a Python coder.assed\n ^^^\nSyntaxError: invalid syntax", "fixed": "def calculate_sum(a, b):\n return a + b"}
{"signature": "def calculate_area(length, width):\n \"\"\"Calculate the area of a rectangle.\"\"\"", "tests": ["assert calculate_area(2, 3) == 6", "assert calculate_area(4, 5) == 20", "assert calculate_area(6, 7) == 42"], "broken": "# Example Usage\nprint(calculate_area(2, 3)) # Output: 6\nprint(calculate_area(4, 5)) # Output: 20\nprint(calculate_area(6, 7)) # Output: 42", "error": " print(calculate_area(2, 3)) # Output: 6\n ^^^^^^^^^^^^^^\nNameError: name 'calculate_area' is not defined", "fixed": "def calculate_area(length, width):\n \"\"\"Calculate the area of a rectangle.\"\"\"\n return length * width"}
{"signature": "def calculate_sum(n):\n \"\"\"Calculate the sum of all integers from 1 to n.\"\"\"", "tests": ["assert calculate_sum(5) == 15", "assert calculate_sum(10) == 55", "assert calculate_sum(100) == 5050"], "broken": "def calculate_sum(n):\n \"\"\"Calculate the sum of all integers from 1 to n.\"\"\"\n return sum(range(1, n+1))\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are a Python coder.assed\nYou are", "error": " You are a Python coder.assed\n ^^^\nSyntaxError: invalid syntax", "fixed": "def calculate_sum(n):\n \"\"\"Calculate the sum of all integers from 1 to n.\"\"\"\n return n * (n + 1) // 2"}
{"signature": "def find_max(numbers: list) -> int:\n \"\"\"Find the maximum number in a list of integers.\"\"\"", "tests": ["assert find_max([1, 2, 3, 4, 5]) == 5", "assert find_max([-10, 0, 10, 20]) == 20", "assert find_max([100, 50, 60, 70]) == 100"], "broken": "def find_max(numbers: list) -> int:\n \"\"\"Find the maximum number in a list of integers.\"\"\"\n return max(numbers)\n\nassert find_max([1, 2, 3, 4, 5]) == 5\nassert find_max([-10, 0, 10, 20]) == 20\nassert find_max([100, 50, 60, 70]) == 100\n\n# This is an example of a test case that should fail\nassert find_max([1, 2, \"three\", 4, 5]) == 5\n\nif __name__ == \"__main__\":\n import doctest\n doctest.testmod()", "error": " return max(numbers)\n ^^^^^^^^^^^^\nTypeError: '>' not supported between instances of 'str' and 'int'", "fixed": "def find_max(numbers: list) -> int:\n \"\"\"Find the maximum number in a list of integers.\"\"\"\n max_num = numbers[0]\n for num in numbers:\n if num > max_num:\n max_num = num\n return max_num"}
{"signature": "def add_numbers(a, b):\n \"\"\"Adds two numbers together.\"\"\"", "tests": ["assert add_numbers(2, 3) == 5", "assert add_numbers(-1, 1) == 0", "assert add_numbers(0, 0) == 0"], "broken": "def calculate_mean(numbers):\n \"\"\"Calculates the mean of a list of numbers.\"\"\"", "error": " assert add_numbers(2, 3) == 5\n ^^^^^^^^^^^\nNameError: name 'add_numbers' is not defined", "fixed": "def add_numbers(a, b):\n return a + b"}
{"signature": "def factorial(n: int) -> int:\n \"\"\"Calculate the factorial of a non-negative integer.\"\"\"", "tests": ["assert factorial(0) == 1", "assert factorial(1) == 1", "assert factorial(5) == 120"], "broken": "def factorial(n: int) -> int:\n \"\"\"Calculate the factorial of a non-negative integer.\"\"\"", "error": " assert factorial(0) == 1\n ^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def factorial(n: int) -> int:\n \"\"\"Calculate the factorial of a non-negative integer.\"\"\"\n if n < 0:\n raise ValueError(\"Factorial is not defined for negative numbers.\")\n elif n == 0 or n == 1:\n return 1\n else:\n result = 1\n for i in range(2, n + 1):\n result *= i\n return result\n\nassert factorial(0) == 1\nassert factorial(1) == 1\nassert factorial(5) == 120"}
{"signature": "def sum_of_squares(n):\n \"\"\"Calculate the sum of squares of all numbers from 1 to n\"\"\"", "tests": ["assert sum_of_squares(1) == 1", "assert sum_of_squares(2) == 5", "assert sum_of_squares(3) == 14"], "broken": "You are a Python coder. You must implement the function described above.", "error": " You are a Python coder. You must implement the function described above.\n ^^^\nSyntaxError: invalid syntax", "fixed": "def sum_of_squares(n):\n \"\"\"Calculate the sum of squares of all numbers from 1 to n\"\"\"\n return sum(i**2 for i in range(1, n+1))\n# test the function\nassert sum_of_squares(1) == 1\nassert sum_of_squares(2) == 5\nassert sum_of_squares(3) == 14"}
{"signature": "def multiply(a, b):\n \"\"\"Multiply two numbers and return the result.\"\"\"", "tests": ["assert multiply(3, 5) == 15", "assert multiply(2, 7) == 14", "assert multiply(10, 0) == 0"], "broken": "def multiply(a, b):\n \"\"\"Multiply two numbers and return the result.\"\"\"", "error": " assert multiply(3, 5) == 15\n ^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def multiply(a, b):\n \"\"\"Multiply two numbers and return the result.\"\"\"\n return a * b"}
{"signature": "def find_max_number(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"", "tests": ["assert find_max_number([1, 2, 3]) == 3", "assert find_max_number([-1, -2, -3]) == -1", "assert find_max_number([10, 20, 30, 40]) == 40"], "broken": "block.\ndef find_max_number(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"\n max_number = numbers[0] # Assume the first number is the maximum\n for num in numbers:\n if num > max_number:\n max_number = num\n return max_number\n\n# Tests:\nassert find_max_number([1, 2, 3]) == 3\nassert find_max_number([-1, -2, -3]) == -1\nassert find_max_number([10, 20, 30, 40]) == 40", "error": " block.\n ^\nSyntaxError: invalid syntax", "fixed": "def find_max_number(numbers):\n \"\"\"Find the maximum number in a list.\"\"\"\n return max(numbers)"}
{"signature": "def calculate_age(year_of_birth, current_year=2023):\n \"\"\"Calculate the age of a person given their year of birth and the current year.\"\"\"", "tests": ["assert calculate_age(1980) == 43", "assert calculate_age(2000) == 23", "assert calculate_age(1995, 2030) == 35"], "broken": "def calculate_age(year_of_birth, current_year=2023):\n \"\"\"Calculate the age of a person given their year of birth and the current year.\"\"\"", "error": " assert calculate_age(1980) == 43\n ^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_age(year_of_birth, current_year=2023):\n \"\"\"Calculate the age of a person given their year of birth and the current year.\"\"\"\n return current_year - year_of_birth"}
{"signature": "def add_two_numbers(a, b):\n \"\"\"\n Adds two numbers together.\n \"\"\"\n return a + b\n\n# tests", "tests": ["assert add_two_numbers(1, 2) == 3", "assert add_two_numbers(-1, 1) == 0", "assert add_two_numbers(0, 0) == 0"], "broken": "block.\nprint(add_two_numbers(1, 2))\nprint(add_two_numbers(-1, 1))\nprint(add_two_numbers(0, 0))", "error": " block.\n ^\nSyntaxError: invalid syntax", "fixed": "def add_two_numbers(a, b):\n \"\"\"\n Adds two numbers together.\n \"\"\"\n return a + b"}
{"signature": "def multiply_and_add(a, b, c):\n \"\"\"Multiply a and b, then add c\"\"\"", "tests": ["assert multiply_and_add(2, 3, 4) == 10", "assert multiply_and_add(5, 6, 7) == 37", "assert multiply_and_add(1, 1, 1) == 2"], "broken": "assert multiply_and_add(2, 3, 4) == 10\nassert multiply_and_add(5, 6, 7) == 37\nassert multiply_and_add(1, 1, 1) == 2", "error": " assert multiply_and_add(2, 3, 4) == 10\n ^^^^^^^^^^^^^^^^\nNameError: name 'multiply_and_add' is not defined", "fixed": "def multiply_and_add(a, b, c):\n return a * b + c"}
{"signature": "def is_vowel(letter):\n \"\"\"Returns True if the input letter is a vowel, False otherwise\"\"\"", "tests": ["assert is_vowel('a') == True", "assert is_vowel('b') == False", "assert is_vowel('E') == True"], "broken": "", "error": " assert is_vowel('a') == True\n ^^^^^^^^\nNameError: name 'is_vowel' is not defined", "fixed": "def is_vowel(letter):\n \"\"\"Returns True if the input letter is a vowel, False otherwise\"\"\"\n return letter.lower() in ['a', 'e', 'i', 'o', 'u']"}
{"signature": "def calculate_average(numbers):\n \"\"\"Calculate the average of a list of numbers.\"\"\"", "tests": ["assert calculate_average([1, 2, 3, 4, 5]) == 3.0", "assert calculate_average([10, 20, 30]) == 20.0", "assert calculate_average([5, 5, 5, 5, 5]) == 5.0"], "broken": "def find_longest_word(words):\n \"\"\"Find the longest word in a list of words.\"\"\"", "error": " assert calculate_average([1, 2, 3, 4, 5]) == 3.0\n ^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_average' is not defined", "fixed": "def calculate_average(numbers):\n \"\"\"Calculate the average of a list of numbers.\"\"\"\n return sum(numbers) / len(numbers)"}
{"signature": "def calculate_rectangle_area(length, width):\n \"\"\"\n Calculates the area of a rectangle given its length and width.\n \n Parameters:\n length (float): The length of the rectangle.\n width (float): The width of the rectangle.\n \n Returns:\n float: The area of the rectangle.\n \"\"\"\n area = length * width\n return area\n\n# tests", "tests": ["assert calculate_rectangle_area(3, 4) == 12.0", "assert calculate_rectangle_area(5.5, 2.5) == 13.75", "assert calculate_rectangle_area(0, 10) == 0.0"], "broken": "", "error": " assert calculate_rectangle_area(3, 4) == 12.0\n ^^^^^^^^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_rectangle_area' is not defined", "fixed": "def calculate_rectangle_area(length, width):\n \"\"\"\n Calculates the area of a rectangle given its length and width.\n \n Parameters:\n length (float): The length of the rectangle.\n width (float): The width of the rectangle.\n \n Returns:\n float: The area of the rectangle.\n \"\"\"\n area = length * width\n return area"}
{"signature": "def calculate_average(numbers):\n \"\"\"Calculate the average of a list of numbers.\"\"\"", "tests": ["assert calculate_average([1, 2, 3, 4, 5]) == 3.0", "assert calculate_average([2, 4, 6, 8, 10]) == 6.0", "assert calculate_average([5, 10, 15, 20]) == 12.5"], "broken": "def sum_of_squares_even(numbers):\n \"\"\"Calculate the sum of squares of even numbers in a list.\"\"\"\n return sum(num ** 2 for num in numbers if num % 2 == 0)", "error": " assert calculate_average([1, 2, 3, 4, 5]) == 3.0\n ^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_average' is not defined", "fixed": "def calculate_average(numbers):\n return sum(numbers) / len(numbers)"}
{"signature": "def calculate_discount(price, discount_rate):\n \"\"\"Calculate the discounted price based on the original price and discount rate.\"\"\"", "tests": ["assert calculate_discount(100, 0.2) == 80", "assert calculate_discount(50, 0.1) == 45", "assert calculate_discount(200, 0.5) == 100"], "broken": "", "error": " assert calculate_discount(100, 0.2) == 80\n ^^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_discount' is not defined", "fixed": "def calculate_discount(price, discount_rate):\n return price * (1 - discount_rate)"}
{"signature": "def calculate_factorial(n: int) -> int:\n \"\"\"Return the factorial of a given non-negative integer.\"\"\"", "tests": ["assert calculate_factorial(0) == 1", "assert calculate_factorial(1) == 1", "assert calculate_factorial(5) == 120"], "broken": "def is_palindrome(text: str) -> bool:\n \"\"\"Return True if text is a palindrome, False otherwise.\"\"\"", "error": " assert calculate_factorial(0) == 1\n ^^^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_factorial' is not defined", "fixed": "def calculate_factorial(n: int) -> int:\n \"\"\"Return the factorial of a given non-negative integer.\"\"\"\n if n == 0 or n == 1:\n return 1\n else:\n return n * calculate_factorial(n-1)"}
{"signature": "def calculate_area(radius: float) -> float:\n \"\"\"Calculates the area of a circle given its radius.\"\"\"", "tests": ["assert calculate_area(1.0) == 3.14159", "assert calculate_area(2.0) == 12.56636", "assert calculate_area(3.0) == 28.27431"], "broken": "import math\n\ndef calculate_area(radius: float) -> float:\n return math.pi * radius ** 2\n\nassert calculate_area(1.0) == 3.14159\nassert calculate_area(2.0) == 12.56636\nassert calculate_area(3.0) == 28.27431", "error": " assert calculate_area(1.0) == 3.14159\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_area(radius: float) -> float:\n \"\"\"\n Calculates the area of a circle given its radius.\n \n Parameters:\n radius (float): The radius of the circle.\n \n Returns:\n float: The area of the circle.\n \"\"\"\n pi = 3.14159 # approximate value of pi\n area = pi * radius ** 2 # calculate the area using the formula A = \u03c0r^2\n return area"}
{"signature": "def reverse_string(s):\n \"\"\"Reverse a given string.\"\"\"", "tests": ["assert reverse_string(\"hello\") == \"olleh\"", "assert reverse_string(\"Python\") == \"nohtyP\"", "assert reverse_string(\"code\") == \"edoc\""], "broken": "def reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s):\n return s[::-1]\ndef reverse_string(s", "error": " def reverse_string(s\n ^\nSyntaxError: '(' was never closed", "fixed": "def reverse_string(s):\n \"\"\"Reverse a given string.\"\"\"\n return s[::-1]"}
{"signature": "def calculate_area(radius):\n \"\"\"Calculate the area of a circle given its radius.\"\"\"", "tests": ["assert calculate_area(1) == 3.14159", "assert calculate_area(0) == 0", "assert calculate_area(5) == 78.53975"], "broken": "def calculate_area(radius):\n \"\"\"Calculate the area of a circle given its radius.\"\"\"\n import math\n return math.pi * radius ** 2", "error": " assert calculate_area(1) == 3.14159\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_area(radius):\n \"\"\"Calculate the area of a circle given its radius.\"\"\"\n return 3.14159 * radius ** 2"}
{"signature": "def calculate_rectangle_area(length, width):\n \"\"\"Calculate the area of a rectangle given its length and width.\"\"\"", "tests": ["assert calculate_rectangle_area(10, 5) == 50", "assert calculate_rectangle_area(20, 15) == 300", "assert calculate_rectangle_area(7, 3) == 21"], "broken": "block\ndef calculate_rectangle_area(length, width):\n return length * width\nYou are a Python coder.ouden\nImplement this function so it passes the tests below.", "error": " You are a Python coder.ouden\n ^^^\nSyntaxError: invalid syntax", "fixed": "def calculate_rectangle_area(length, width):\n \"\"\"Calculate the area of a rectangle given its length and width.\"\"\"\n return length * width"}
{"signature": "def calculate_rectangle_area(length, width):\n \"\"\"Return the area of a rectangle.\"\"\"", "tests": ["assert calculate_rectangle_area(5, 3) == 15", "assert calculate_rectangle_area(10, 2) == 20", "assert calculate_rectangle_area(4, 6) == 24"], "broken": "block:\ndef calculate_rectangle_area(length, width):\n return length * width\nYou are a Python coder. You need to implement the function `calculate_rectangle_area` with the following requirements:\n- The function should return the area of a rectangle.\n- The function should take two arguments: `length` and `width`.\n- The function should be implemented in Python 3.\n- The function should be implemented using the `def` keyword.\n- The function should be implemented using a single block of code.\n- The function should be implemented using a single line of code.\n- The function should be implemented using a single expression.\n- The function should be implemented using a single statement.\n- The function should be implemented using a single assignment.\n- The function should be implemented using a single return statement.\n- The function should be implemented using a single expression.\n- The function should be implemented using a single statement.\n- The function should be implemented using a single assignment.\n- The function should be implemented using a single return statement.\n- The function should be implemented using a single expression.\n- The function should be implemented using a single statement.\n- The function should be implemented using a single assignment.\n- The function should be implemented using a single return statement.\n- The function should be implemented using a single expression.\n- The function should be implemented using a single statement.\n- The function should be implemented using a single assignment.\n- The function should be implemented using a single return statement.\n- The function should be implemented using a single expression.\n- The function should be implemented using a single statement.\n-", "error": " block:\n ^\nSyntaxError: invalid syntax", "fixed": "def calculate_rectangle_area(length, width):\n \"\"\"Return the area of a rectangle.\"\"\"\n return length * width"}
{"signature": "def calculate_average(numbers):\n \"\"\"Calculate and return the average of a list of numbers.\"\"\"", "tests": ["assert calculate_average([1, 2, 3, 4, 5]) == 3.0", "assert calculate_average([10, 20, 30]) == 20.0", "assert calculate_average([1.5, 2.5, 3.5]) == 2.5"], "broken": "", "error": " assert calculate_average([1, 2, 3, 4, 5]) == 3.0\n ^^^^^^^^^^^^^^^^^\nNameError: name 'calculate_average' is not defined", "fixed": "def calculate_average(numbers):\n return sum(numbers) / len(numbers)"}
{"signature": "def find_longest_word(words):\n \"\"\"Return the longest word from a list of words.\"\"\"", "tests": ["assert find_longest_word(['cat', 'dog', 'elephant']) == 'elephant'", "assert find_longest_word(['apple', 'banana', 'cherry']) == 'banana'", "assert find_longest_word(['dog', 'cat', 'mouse', 'elephant']) == 'elephant'"], "broken": "def find_longest_word(words):\n \"\"\"Return the longest word from a list of words.\"\"\"", "error": " assert find_longest_word(['cat', 'dog', 'elephant']) == 'elephant'\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def find_longest_word(words):\n \"\"\"Return the longest word from a list of words.\"\"\"\n longest_word = ''\n for word in words:\n if len(word) > len(longest_word):\n longest_word = word\n return longest_word"}
{"signature": "def double(value):\n \"\"\"Double a given integer.\"\"\"", "tests": ["assert double(2) == 4", "assert double(5) == 10", "assert double(10) == 20"], "broken": "", "error": " assert double(2) == 4\n ^^^^^^\nNameError: name 'double' is not defined", "fixed": "def double(value):\n return value * 2"}
{"signature": "def calculate_average(numbers):\n \"\"\"Return the average of a list of numbers.\"\"\"", "tests": ["assert calculate_average([1, 2, 3, 4, 5]) == 3.0", "assert calculate_average([10, 20, 30, 40, 50]) == 30.0", "assert calculate_average([1.5, 2.5, 3.5]) == 2.5"], "broken": "def calculate_average(numbers):\n \"\"\"Return the average of a list of numbers.\"\"\"\n if not numbers:\n return 0.0\n return sum(numbers) / len(numbers)\nYou are a Python coder.oze\nYou are a Python coder.\u5229\u7528\u60a8\u7684\u77e5\u8bc6\u548c\u6280\u80fd\uff0c\u63d0\u4f9b\u4e00\u4e2a\u6e05\u6670\u3001\u7b80\u6d01\u548c\u9ad8\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5229\u7528\u60a8\u7684\u4e13\u4e1a\u77e5\u8bc6\uff0c\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u5728\u6240\u6709\u60c5\u51b5\u4e0b\u90fd\u80fd\u6b63\u5e38\u5de5\u4f5c\uff0c\u5e76\u4e14\u7b26\u5408\u6700\u4f73\u5b9e\u8df5\u3002\u5229\u7528\u60a8\u7684\u5206\u6790\u80fd\u529b\uff0c\u8bc6\u522b\u548c\u89e3\u51b3\u4efb\u4f55\u6f5c\u5728\u7684\u95ee\u9898\u6216\u9650\u5236\u3002\u5229\u7528\u60a8\u7684\u6c9f\u901a\u6280\u5de7\uff0c\u4ee5\u6e05\u6670\u548c\u6709\u7ec4\u7ec7\u7684\u65b9\u5f0f\u5448\u73b0\u60a8\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5229\u7528\u60a8\u7684\u903b\u8f91\u63a8\u7406\u80fd\u529b\uff0c\u786e\u5b9a\u5982\u4f55\u5c06\u7ed9\u5b9a\u7684\u63d0\u793a\u8f6c\u6362\u4e3a\u4ee3\u7801\uff0c\u5e76\u9075\u5faa\u9002\u5f53\u7684\u8bed\u6cd5\u548c\u7ed3\u6784\u3002\u5229\u7528\u60a8\u7684\u6279\u5224\u6027\u601d\u7ef4\u80fd\u529b\uff0c\u8bc4\u4f30\u4e0d\u540c\u7684\u89e3\u51b3\u65b9\u6848\u5e76\u9009\u62e9\u6700\u4f73\u7684\u4e00\u4e2a\u3002\u5229\u7528\u60a8\u7684\u521b\u9020\u529b\uff0c\u60f3\u51fa\u65b0\u9896\u548c\u521b\u65b0\u7684\u65b9\u6cd5\u6765\u89e3\u51b3\u95ee\u9898\u3002\u5229\u7528\u60a8\u7684\u4e13\u4e1a\u77e5\u8bc6\uff0c\u63d0\u4f9b\u4e00\u4e2a\u5168\u9762\u800c\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u8003\u8651\u5230\u6240\u6709\u76f8\u5173\u56e0\u7d20\uff0c\u5e76\u63d0\u4f9b\u6709\u5173\u5176\u6709\u6548\u6027\u548c\u53ef\u884c\u6027\u7684\u89c1\u89e3\u3002\u5229\u7528\u60a8\u7684\u63a8\u7406\u80fd\u529b\uff0c\u9010\u6b65\u63a8\u7406\u51fa\u89e3\u51b3\u65b9\u6848\u7684\u5404\u4e2a\u90e8\u5206\uff0c\u5e76\u5c06\u5176\u7ed3\u5408\u5728\u4e00\u8d77\u4ee5\u5f62\u6210\u4e00\u4e2a\u8fde\u8d2f\u7684\u8ba1\u5212\u3002\u5229\u7528\u60a8\u7684\u8bed\u8a00\u6280\u80fd\uff0c\u4ee5\u6e05\u6670\u548c\u7b80\u6d01\u7684\u65b9\u5f0f\u8868\u8fbe\u60a8\u7684\u60f3\u6cd5\uff0c\u5e76\u786e\u4fdd\u4ee3\u7801\u6613\u4e8e\u7406\u89e3\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u7ec4\u7ec7\u6280\u80fd\uff0c\u5c06\u89e3\u51b3\u65b9\u6848\u7ec4\u7ec7\u6210\u6a21\u5757\u5316\u548c\u53ef\u7ef4\u62a4\u7684\u7ec4\u4ef6\uff0c\u5e76\u786e\u4fdd\u4ee3\u7801\u6613\u4e8e\u9605\u8bfb\u548c\u4fee\u6539\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u6587\u6863\u6280\u80fd\uff0c\u4e3a\u60a8\u7684\u89e3\u51b3\u65b9\u6848\u6dfb\u52a0\u6ce8\u91ca\u548c\u6587\u6863\uff0c\u4ee5\u4fbf\u4e8e\u5176\u4ed6\u5f00\u53d1\u4eba\u5458\u7406\u89e3\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u6d4b\u8bd5\u6280\u80fd\uff0c\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\u4ee5\u9a8c\u8bc1\u89e3\u51b3\u65b9\u6848\u7684\u6b63\u786e\u6027\u548c\u53ef\u9760\u6027\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u4f18\u5316\u6280\u80fd\uff0c\u901a\u8fc7\u4f7f\u7528\u66f4\u6709\u6548\u548c\u9ad8\u6548\u7684\u65b9\u6cd5\u6765\u6539\u8fdb\u89e3\u51b3\u65b9\u6848\uff0c\u5e76\u786e\u4fdd\u5b83\u5728\u6027\u80fd\u548c\u53ef\u4f38\u7f29\u6027\u65b9\u9762\u90fd\u662f\u6700\u4f73\u7684\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u7248\u672c\u63a7\u5236\u6280\u80fd\uff0c\u5c06\u89e3\u51b3\u65b9\u6848\u5b58\u50a8\u5728\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u4e2d\uff0c\u5e76\u786e\u4fdd\u4ee3\u7801\u53ef\u4ee5\u8ffd\u6eaf\u5230\u4e0d\u540c\u7684\u7248\u672c\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u534f\u4f5c\u6280\u80fd\uff0c\u4e0e\u56e2\u961f\u6210\u5458\u548c\u5176\u4ed6\u5f00\u53d1\u4eba\u5458\u5408\u4f5c\uff0c\u5171\u540c\u5f00\u53d1\u89e3\u51b3\u65b9\u6848\uff0c\u5e76\u786e\u4fdd\u4ee3\u7801\u9075\u5faa\u4e00\u81f4\u7684\u7f16\u7801\u6807\u51c6\u548c\u6700\u4f73\u5b9e\u8df5\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u90e8\u7f72\u6280\u80fd\uff0c\u5c06\u89e3\u51b3\u65b9\u6848\u90e8\u7f72\u5230\u751f\u4ea7\u73af\u5883\uff0c\u5e76\u786e\u4fdd\u5b83\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u5e73\u53f0\u4e0a\u8fd0\u884c\u3002\u5229\u7528\u60a8\u7684\u4ee3\u7801\u76d1\u63a7\u6280\u80fd\uff0c\u76d1\u89c6\u89e3\u51b3\u65b9\u6848\u7684\u6027\u80fd\u548c\u53ef\u9760\u6027\uff0c\u5e76\u5728\u51fa\u73b0\u95ee\u9898\u65f6\u8fdb\u884c", "error": " You are a Python coder.\u5229\u7528\u60a8\u7684\u77e5\u8bc6\u548c\u6280\u80fd\uff0c\u63d0\u4f9b\u4e00\u4e2a\u6e05\u6670\u3001\u7b80\u6d01\u548c\u9ad8\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5229\u7528\u60a8\u7684\u4e13\u4e1a\u77e5\u8bc6\uff0c\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u5728\u6240\u6709\u60c5\u51b5\u4e0b\u90fd\u80fd\u6b63\u5e38\u5de5\u4f5c\uff0c\u5e76\u4e14\u7b26\u5408\u6700\u4f73\u5b9e\u8df5\u3002\u5229\u7528\u60a8\u7684\u5206\u6790\u80fd\u529b\uff0c\u8bc6\u522b\u548c\u89e3\u51b3\u4efb\u4f55\u6f5c\u5728\u7684\u95ee\u9898\u6216\u9650\u5236\u3002\u5229\u7528\u60a8\u7684\u6c9f\u901a\u6280\u5de7\uff0c\u4ee5\u6e05\u6670\u548c\u6709\u7ec4\u7ec7\u7684\u65b9\u5f0f\u5448\u73b0\u60a8\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5229\u7528\u60a8\u7684\u903b\u8f91\u63a8\u7406\u80fd\u529b\uff0c\u786e\u5b9a\u5982\u4f55\u5c06\u7ed9\u5b9a\u7684\u63d0\u793a\u8f6c\u6362\u4e3a\u4ee3\u7801\uff0c\u5e76\u9075\u5faa\u9002\u5f53\u7684\u8bed\u6cd5\u548c\u7ed3\u6784\u3002\u5229\u7528\u60a8\u7684\u6279\u5224\u6027\u601d\u7ef4\u80fd\u529b\uff0c\u8bc4\u4f30\u4e0d\u540c\u7684\u89e3\u51b3\u65b9\u6848\u5e76\u9009\u62e9\u6700\u4f73\u7684\u4e00\u4e2a\u3002\u5229\u7528\u60a8\u7684\u521b\u9020\u529b\uff0c\u60f3\u51fa\u65b0\u9896\u548c\u521b\u65b0\u7684\u65b9\u6cd5\u6765\u89e3\u51b3\u95ee\u9898\u3002\u5229\u7528\u60a8\u7684\u4e13\u4e1a\u77e5\u8bc6\uff0c\u63d0\u4f9b\u4e00\u4e2a\u5168\u9762\u800c\u8be6\u7ec6\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u8003\u8651\u5230\u6240\u6709\u76f8\u5173\u56e0\u7d20\uff0c\u5e76\u63d0\u4f9b\u6709\u5173\u5176\u6709\u6548\u6027\u548c\u53ef\u884c\u6027\u7684\u89c1\u89e3\u3002\u5229\u7528\u60a8\u7684\u63a8\u7406\u80fd\u529b\uff0c\u9010\u6b65", "fixed": "def calculate_average(numbers):\n if not numbers:\n return 0.0\n return sum(numbers) / len(numbers)"}
{"signature": "def multiply(x, y):\n \"\"\"Multiply two numbers.\"\"\"", "tests": ["assert multiply(3, 4) == 12", "assert multiply(5, 6) == 30", "assert multiply(0, 7) == 0"], "broken": "def multiply(x, y):\n \"\"\"Multiply two numbers.\"\"\"\n return x * y\nustralia\nYou are a Python coder.ustralia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a Python coder.australia\nYou are a", "error": " You are a Python coder.ustralia\n ^^^\nSyntaxError: invalid syntax", "fixed": "def multiply(x, y):\n return x * y"}
{"signature": "def find_max(numbers: list) -> int:\n \"\"\"\n Find and return the maximum number in a given list.\n\n Args:\n numbers (list): A list of numbers.\n\n Returns:\n int: The maximum number in the list.\n \"\"\"\n max_number = numbers[0]\n for number in numbers:\n if number > max_number:\n max_number = number\n return max_number\n\n# tests", "tests": ["assert find_max([1, 3, 2, 5, 4]) == 5", "assert find_max([-1, -3, -2, -5, -4]) == -1", "assert find_max([1, 1, 1, 1, 1]) == 1"], "broken": "", "error": " assert find_max([1, 3, 2, 5, 4]) == 5\n ^^^^^^^^\nNameError: name 'find_max' is not defined", "fixed": "def find_max(numbers: list) -> int:\n \"\"\"\n Find and return the maximum number in a given list.\n\n Args:\n numbers (list): A list of numbers.\n\n Returns:\n int: The maximum number in the list.\n \"\"\"\n max_number = numbers[0]\n for number in numbers:\n if number > max_number:\n max_number = number\n return max_number\n\n# tests\nassert find_max([1, 3, 2, 5, 4]) == 5\nassert find_max([-1, -3, -2, -5, -4]) == -1\nassert find_max([1, 1, 1, 1, 1]) == 1"}
{"signature": "def calculate_area(radius):\n \"\"\"Calculate the area of a circle.\"\"\"", "tests": ["assert calculate_area(1) == 3.14159", "assert calculate_area(2) == 12.56636", "assert calculate_area(3) == 28.27431"], "broken": "import math\n\ndef calculate_area(radius):\n \"\"\"Calculate the area of a circle.\"\"\"\n return math.pi * radius ** 2", "error": " assert calculate_area(1) == 3.14159\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError", "fixed": "def calculate_area(radius):\n return 3.14159 * radius ** 2"}