You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
reflexion-human-eval/benchmarks/mbpp-py.jsonl

398 lines
308 KiB
JSON

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"name": "mbpp_234_volume_cube", "language": "py", "prompt": "def volume_cube(l: int) -> int:\n \"\"\"\n\tWrite a function to find the volume of a cube given its side length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_234_volume_cube.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "volume_cube", "test": "def check(candidate):\n assert candidate(3) == 27\n assert candidate(2) == 8\n assert candidate(5) == 125\n\ndef test_check():\n check(volume_cube)\n\ntest_check()\n"}
{"name": "mbpp_89_closest_num", "language": "py", "prompt": "def closest_num(N: int) -> int:\n \"\"\"\n\tWrite a function to find the closest smaller number than n.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_89_closest_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "closest_num", "test": "def check(candidate):\n assert candidate(11) == 10\n assert candidate(7) == 6\n assert candidate(12) == 11\n\ndef test_check():\n check(closest_num)\n\ntest_check()\n"}
{"name": "mbpp_245_max_sum", "language": "py", "prompt": "from typing import List\n\ndef max_sum(arr: List[int]) -> int:\n \"\"\"\n\tWrite a function that takes an array and finds the maximum sum of a bitonic subsequence for the given array, where a sequence is bitonic if it is first increasing and then decreasing.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_245_max_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_sum", "test": "def check(candidate):\n assert candidate([1, 15, 51, 45, 33, 100, 12, 18, 9]) == 194\n assert candidate([80, 60, 30, 40, 20, 10]) == 210\n assert candidate([2, 3, 14, 16, 21, 23, 29, 30]) == 138\n\ndef test_check():\n check(max_sum)\n\ntest_check()\n"}
{"name": "mbpp_237_check_occurences", "language": "py", "prompt": "from typing import List, Tuple, Dict\n\ndef check_occurences(test_list: List[Tuple[int, int]]) -> Dict[Tuple[int, int], int]:\n \"\"\"\n\tWrite a function that takes in a list of tuples and returns a dictionary mapping each unique tuple to the number of times it occurs in the list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_237_check_occurences.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_occurences", "test": "def check(candidate):\n assert candidate([(3, 1), (1, 3), (2, 5), (5, 2), (6, 3)]) == { (1, 3): 2, (2, 5): 2, (3, 6): 1 }\n assert candidate([(4, 2), (2, 4), (3, 6), (6, 3), (7, 4)]) == { (2, 4): 2, (3, 6): 2, (4, 7): 1 }\n assert candidate([(13, 2), (11, 23), (12, 25), (25, 12), (16, 23)]) == { (2, 13): 1, (11, 23): 1, (12, 25): 2, (16, 23): 1 }\n\ndef test_check():\n check(check_occurences)\n\ntest_check()\n"}
{"name": "mbpp_77_is_Diff", "language": "py", "prompt": "def is_Diff(n: int) -> bool:\n \"\"\"\n\tWrite a python function to find whether a number is divisible by 11.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_77_is_Diff.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_Diff", "test": "def check(candidate):\n assert candidate(12345) == False\n assert candidate(1212112) == True\n assert candidate(1212) == False\n\ndef test_check():\n check(is_Diff)\n\ntest_check()\n"}
{"name": "mbpp_123_amicable_numbers_sum", "language": "py", "prompt": "def amicable_numbers_sum(limit: int) -> int:\n \"\"\"\n\tWrite a function to sum all amicable numbers from 1 to a specified number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_123_amicable_numbers_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "amicable_numbers_sum", "test": "def check(candidate):\n assert candidate(999) == 504\n assert candidate(9999) == 31626\n assert candidate(99) == 0\n\ndef test_check():\n check(amicable_numbers_sum)\n\ntest_check()\n"}
{"name": "mbpp_420_cube_Sum", "language": "py", "prompt": "def cube_Sum(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the cube sum of first n even natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_420_cube_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "cube_Sum", "test": "def check(candidate):\n assert candidate(2) == 72\n assert candidate(3) == 288\n assert candidate(4) == 800\n\ndef test_check():\n check(cube_Sum)\n\ntest_check()\n"}
{"name": "mbpp_585_expensive_items", "language": "py", "prompt": "from typing import List, Dict, Union\n\ndef expensive_items(items: List[Dict[str, Union[str, float]]], n: int) -> List[Dict[str, Union[str, float]]]:\n \"\"\"\n\tWrite a function to find the n most expensive items in a given dataset.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_585_expensive_items.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "expensive_items", "test": "def check(candidate):\n assert candidate([{ 'name': 'Item-1', 'price': 101.1 }, { 'name': 'Item-2', 'price': 555.22 }], 1) == [{ 'name': 'Item-2', 'price': 555.22 }]\n assert candidate([{ 'name': 'Item-1', 'price': 101.1 }, { 'name': 'Item-2', 'price': 555.22 }, { 'name': 'Item-3', 'price': 45.09 }], 2) == [{ 'name': 'Item-2', 'price': 555.22 }, { 'name': 'Item-1', 'price': 101.1 }]\n assert candidate([{ 'name': 'Item-1', 'price': 101.1 }, { 'name': 'Item-2', 'price': 555.22 }, { 'name': 'Item-3', 'price': 45.09 }, { 'name': 'Item-4', 'price': 22.75 }], 1) == [{ 'name': 'Item-2', 'price': 555.22 }]\n\ndef test_check():\n check(expensive_items)\n\ntest_check()\n"}
{"name": "mbpp_20_is_woodall", "language": "py", "prompt": "def is_woodall(x: int) -> bool:\n \"\"\"\n\tWrite a function to check if the given number is woodball or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_20_is_woodall.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_woodall", "test": "def check(candidate):\n assert candidate(383) == True\n assert candidate(254) == False\n assert candidate(200) == False\n\ndef test_check():\n check(is_woodall)\n\ntest_check()\n"}
{"name": "mbpp_805_max_sum_list", "language": "py", "prompt": "from typing import List\n\ndef max_sum_list(lists: List[List[int]]) -> List[int]:\n \"\"\"\n\tWrite a function that returns the list in a list of lists whose sum of elements is the highest.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_805_max_sum_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_sum_list", "test": "def check(candidate):\n assert candidate([[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]) == [10, 11, 12]\n assert candidate([[3, 2, 1], [6, 5, 4], [12, 11, 10]]) == [12, 11, 10]\n assert candidate([[2, 3, 1]]) == [2, 3, 1]\n\ndef test_check():\n check(max_sum_list)\n\ntest_check()\n"}
{"name": "mbpp_806_max_run_uppercase", "language": "py", "prompt": "def max_run_uppercase(test_str: str) -> int:\n \"\"\"\n\tWrite a function to find maximum run of uppercase characters in the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_806_max_run_uppercase.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_run_uppercase", "test": "def check(candidate):\n assert candidate('GeMKSForGERksISBESt') == 5\n assert candidate('PrECIOusMOVemENTSYT') == 6\n assert candidate('GooGLEFluTTER') == 4\n\ndef test_check():\n check(max_run_uppercase)\n\ntest_check()\n"}
{"name": "mbpp_455_check_monthnumb_number", "language": "py", "prompt": "def check_monthnumb_number(monthnum2: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given month number contains 31 days or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_455_check_monthnumb_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_monthnumb_number", "test": "def check(candidate):\n assert candidate(5) == True\n assert candidate(2) == False\n assert candidate(6) == False\n\ndef test_check():\n check(check_monthnumb_number)\n\ntest_check()\n"}
{"name": "mbpp_577_last_Digit_Factorial", "language": "py", "prompt": "def last_Digit_Factorial(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the last digit in factorial of a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_577_last_Digit_Factorial.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "last_Digit_Factorial", "test": "def check(candidate):\n assert candidate(4) == 4\n assert candidate(21) == 0\n assert candidate(30) == 0\n\ndef test_check():\n check(last_Digit_Factorial)\n\ntest_check()\n"}
{"name": "mbpp_555_difference", "language": "py", "prompt": "def difference(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the difference between the sum of cubes of the first n natural numbers and the sum of the first n natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_555_difference.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "difference", "test": "def check(candidate):\n assert candidate(3) == 30\n assert candidate(5) == 210\n assert candidate(2) == 6\n\ndef test_check():\n check(difference)\n\ntest_check()\n"}
{"name": "mbpp_456_reverse_string_list", "language": "py", "prompt": "from typing import List\n\ndef reverse_string_list(stringlist: List[str]) -> List[str]:\n \"\"\"\n\tWrite a function to reverse each string in a given list of string values.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_456_reverse_string_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "reverse_string_list", "test": "def check(candidate):\n assert candidate(['Red', 'Green', 'Blue', 'White', 'Black']) == ['deR', 'neerG', 'eulB', 'etihW', 'kcalB']\n assert candidate(['john', 'amal', 'joel', 'george']) == ['nhoj', 'lama', 'leoj', 'egroeg']\n assert candidate(['jack', 'john', 'mary']) == ['kcaj', 'nhoj', 'yram']\n\ndef test_check():\n check(reverse_string_list)\n\ntest_check()\n"}
{"name": "mbpp_587_list_tuple", "language": "py", "prompt": "from typing import List, Any\n\ndef list_tuple(listx: List[int]) -> Any:\n \"\"\"\n\tWrite a function to convert a list to a tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_587_list_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "list_tuple", "test": "def check(candidate):\n assert candidate([5, 10, 7, 4, 15, 3]) == (5, 10, 7, 4, 15, 3)\n assert candidate([2, 4, 5, 6, 2, 3, 4, 4, 7]) == (2, 4, 5, 6, 2, 3, 4, 4, 7)\n assert candidate([58, 44, 56]) == (58, 44, 56)\n\ndef test_check():\n check(list_tuple)\n\ntest_check()\n"}
{"name": "mbpp_612_merge", "language": "py", "prompt": "from typing import List, Any\n\ndef merge(lst: List[List[Any]]) -> List[List[Any]]:\n \"\"\"\n\tWrite a python function which takes a list of lists, where each sublist has two elements, and returns a list of two lists where the first list has the first element of each sublist and the second one has the second.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_612_merge.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "merge", "test": "def check(candidate):\n assert candidate([['x', 'y'], ['a', 'b'], ['m', 'n']]) == [['x', 'a', 'm'], ['y', 'b', 'n']]\n assert candidate([[1, 2], [3, 4], [5, 6], [7, 8]]) == [[1, 3, 5, 7], [2, 4, 6, 8]]\n assert candidate([['x', 'y', 'z'], ['a', 'b', 'c'], ['m', 'n', 'o']]) == [['x', 'a', 'm'], ['y', 'b', 'n'], ['z', 'c', 'o']]\n\ndef test_check():\n check(merge)\n\ntest_check()\n"}
{"name": "mbpp_12_sort_matrix", "language": "py", "prompt": "from typing import List\n\ndef sort_matrix(M: List[List[int]]) -> List[List[int]]:\n \"\"\"\n\tWrite a function to sort a given matrix in ascending order according to the sum of its rows.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_12_sort_matrix.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sort_matrix", "test": "def check(candidate):\n assert candidate([[1, 2, 3], [2, 4, 5], [1, 1, 1]]) == [[1, 1, 1], [1, 2, 3], [2, 4, 5]]\n assert candidate([[1, 2, 3], [-2, 4, -5], [1, -1, 1]]) == [[-2, 4, -5], [1, -1, 1], [1, 2, 3]]\n assert candidate([[5, 8, 9], [6, 4, 3], [2, 1, 4]]) == [[2, 1, 4], [6, 4, 3], [5, 8, 9]]\n\ndef test_check():\n check(sort_matrix)\n\ntest_check()\n"}
{"name": "mbpp_584_find_adverbs", "language": "py", "prompt": "def find_adverbs(text: str) -> str:\n \"\"\"\n\tWrite a function to find the first adverb ending with ly and its positions in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_584_find_adverbs.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_adverbs", "test": "def check(candidate):\n assert candidate('Clearly, he has no excuse for such behavior.') == '0-7: Clearly'\n assert candidate('Please handle the situation carefuly') == '28-36: carefuly'\n assert candidate('Complete the task quickly') == '18-25: quickly'\n\ndef test_check():\n check(find_adverbs)\n\ntest_check()\n"}
{"name": "mbpp_86_centered_hexagonal_number", "language": "py", "prompt": "def centered_hexagonal_number(n: int) -> int:\n \"\"\"\n\tWrite a function to find nth centered hexagonal number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_86_centered_hexagonal_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "centered_hexagonal_number", "test": "def check(candidate):\n assert candidate(10) == 271\n assert candidate(2) == 7\n assert candidate(9) == 217\n\ndef test_check():\n check(centered_hexagonal_number)\n\ntest_check()\n"}
{"name": "mbpp_130_max_occurrences", "language": "py", "prompt": "from typing import List\n\ndef max_occurrences(nums: List[int]) -> int:\n \"\"\"\n\tWrite a function to find the item with maximum frequency in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_130_max_occurrences.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_occurrences", "test": "def check(candidate):\n assert candidate([2, 3, 8, 4, 7, 9, 8, 2, 6, 5, 1, 6, 1, 2, 3, 2, 4, 6, 9, 1, 2]) == 2\n assert candidate([2, 3, 8, 4, 7, 9, 8, 7, 9, 15, 14, 10, 12, 13, 16, 18]) == 8\n assert candidate([10, 20, 20, 30, 40, 90, 80, 50, 30, 20, 50, 10]) == 20\n\ndef test_check():\n check(max_occurrences)\n\ntest_check()\n"}
{"name": "mbpp_580_extract_even", "language": "py", "prompt": "from typing import Tuple, Any\n\ndef extract_even(test_tuple: Tuple[int, int, Tuple[int, int, Tuple[int, int]], int, int]) -> Any:\n \"\"\"\n\tWrite a function to remove uneven elements in the nested mixed tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_580_extract_even.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_even", "test": "def check(candidate):\n assert candidate((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8)\n assert candidate((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8)))\n assert candidate((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)\n\ndef test_check():\n check(extract_even)\n\ntest_check()\n"}
{"name": "mbpp_742_area_tetrahedron", "language": "py", "prompt": "def area_tetrahedron(side: int) -> float:\n \"\"\"\n\tWrite a function to caluclate the area of a tetrahedron.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_742_area_tetrahedron.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "area_tetrahedron", "test": "def check(candidate):\n assert candidate(3) == 15.588457268119894\n assert candidate(20) == 692.8203230275509\n assert candidate(10) == 173.20508075688772\n\ndef test_check():\n check(area_tetrahedron)\n\ntest_check()\n"}
{"name": "mbpp_610_remove_kth_element", "language": "py", "prompt": "from typing import List\n\ndef remove_kth_element(list1: List[int], L: int) -> List[int]:\n \"\"\"\n\tWrite a python function which takes a list and returns a list with the same elements, but the k'th element removed.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_610_remove_kth_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_kth_element", "test": "def check(candidate):\n assert candidate([1, 1, 2, 3, 4, 4, 5, 1], 3) == [1, 1, 3, 4, 4, 5, 1]\n assert candidate([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4], 4) == [0, 0, 1, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]\n assert candidate([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10], 5) == [10, 10, 15, 19, 18, 17, 26, 26, 17, 18, 10]\n\ndef test_check():\n check(remove_kth_element)\n\ntest_check()\n"}
{"name": "mbpp_394_check_distinct", "language": "py", "prompt": "from typing import List\n\ndef check_distinct(test_tup: List[int]) -> bool:\n \"\"\"\n\tWrite a function to check if given list contains no duplicates.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_394_check_distinct.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_distinct", "test": "def check(candidate):\n assert candidate([1, 4, 5, 6, 1, 4]) == False\n assert candidate([1, 4, 5, 6]) == True\n assert candidate([2, 3, 4, 5, 6]) == True\n\ndef test_check():\n check(check_distinct)\n\ntest_check()\n"}
{"name": "mbpp_793_last", "language": "py", "prompt": "from typing import List\n\ndef last(arr: List[int], x: int) -> int:\n \"\"\"\n\tWrite a python function to find the last position of an element in a sorted array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_793_last.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "last", "test": "def check(candidate):\n assert candidate([1, 2, 3], 1) == 0\n assert candidate([1, 1, 1, 2, 3, 4], 1) == 2\n assert candidate([2, 3, 2, 3, 6, 8, 9], 3) == 3\n\ndef test_check():\n check(last)\n\ntest_check()\n"}
{"name": "mbpp_728_sum_list", "language": "py", "prompt": "from typing import List\n\ndef sum_list(lst1: List[int], lst2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function takes as input two lists [a_1,...,a_n], [b_1,...,b_n] and returns [a_1+b_1,...,a_n+b_n].\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_728_sum_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_list", "test": "def check(candidate):\n assert candidate([10, 20, 30], [15, 25, 35]) == [25, 45, 65]\n assert candidate([1, 2, 3], [5, 6, 7]) == [6, 8, 10]\n assert candidate([15, 20, 30], [15, 45, 75]) == [30, 65, 105]\n\ndef test_check():\n check(sum_list)\n\ntest_check()\n"}
{"name": "mbpp_566_sum_digits", "language": "py", "prompt": "def sum_digits(n: int) -> int:\n \"\"\"\n\tWrite a function to get the sum of the digits of a non-negative integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_566_sum_digits.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_digits", "test": "def check(candidate):\n assert candidate(345) == 12\n assert candidate(12) == 3\n assert candidate(97) == 16\n\ndef test_check():\n check(sum_digits)\n\ntest_check()\n"}
{"name": "mbpp_290_max_length", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_length(list1: List[List[int]]) -> Tuple[int, List[int]]:\n \"\"\"\n\tWrite a function to find the list of maximum length in a list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_290_max_length.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_length", "test": "def check(candidate):\n assert candidate([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]) == (3, [13, 15, 17])\n assert candidate([[1], [5, 7], [10, 12, 14, 15]]) == (4, [10, 12, 14, 15])\n assert candidate([[5], [15, 20, 25]]) == (3, [15, 20, 25])\n\ndef test_check():\n check(max_length)\n\ntest_check()\n"}
{"name": "mbpp_413_extract_nth_element", "language": "py", "prompt": "from typing import List, Tuple, Any\n\ndef extract_nth_element(list1: List[Tuple[str, int, int]], n: int) -> List[Any]:\n \"\"\"\n\tWrite a function to extract the nth element from a given list of tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_413_extract_nth_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_nth_element", "test": "def check(candidate):\n assert candidate([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)], 0) == ['Greyson Fulton', 'Brady Kent', 'Wyatt Knott', 'Beau Turnbull']\n assert candidate([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)], 2) == [99, 96, 94, 98]\n assert candidate([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)], 1) == [98, 97, 91, 94]\n\ndef test_check():\n check(extract_nth_element)\n\ntest_check()\n"}
{"name": "mbpp_628_replace_spaces", "language": "py", "prompt": "def replace_spaces(string: str) -> str:\n \"\"\"\n\tWrite a function to replace all spaces in the given string with '%20'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_628_replace_spaces.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_spaces", "test": "def check(candidate):\n assert candidate('My Name is Dawood') == 'My%20Name%20is%20Dawood'\n assert candidate('I am a Programmer') == 'I%20am%20a%20Programmer'\n assert candidate('I love Coding') == 'I%20love%20Coding'\n\ndef test_check():\n check(replace_spaces)\n\ntest_check()\n"}
{"name": "mbpp_417_group_tuples", "language": "py", "prompt": "from typing import List\n\ndef group_tuples(Input: List[List[str]]) -> List[List[str]]:\n \"\"\"\n\tWrite a function to find common first element in given list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_417_group_tuples.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "group_tuples", "test": "def check(candidate):\n assert candidate([['x', 'y'], ['x', 'z'], ['w', 't']]) == [['x', 'y', 'z'], ['w', 't']]\n assert candidate([['a', 'b'], ['a', 'c'], ['d', 'e']]) == [['a', 'b', 'c'], ['d', 'e']]\n assert candidate([['f', 'g'], ['f', 'g'], ['h', 'i']]) == [['f', 'g', 'g'], ['h', 'i']]\n\ndef test_check():\n check(group_tuples)\n\ntest_check()\n"}
{"name": "mbpp_286_max_sub_array_sum_repeated", "language": "py", "prompt": "from typing import List\n\ndef max_sub_array_sum_repeated(a: List[int], n: int, k: int) -> int:\n \"\"\"\n\tWrite a function to find the largest sum of a contiguous array in the modified array which is formed by repeating the given array k times.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_286_max_sub_array_sum_repeated.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_sub_array_sum_repeated", "test": "def check(candidate):\n assert candidate([10, 20, -30, -1], 4, 3) == 30\n assert candidate([-1, 10, 20], 3, 2) == 59\n assert candidate([-1, -2, -3], 3, 3) == -1\n\ndef test_check():\n check(max_sub_array_sum_repeated)\n\ntest_check()\n"}
{"name": "mbpp_66_pos_count", "language": "py", "prompt": "from typing import List\n\ndef pos_count(list: List[int]) -> int:\n \"\"\"\n\tWrite a python function to count the number of positive numbers in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_66_pos_count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "pos_count", "test": "def check(candidate):\n assert candidate([1, -2, 3, -4]) == 2\n assert candidate([3, 4, 5, -1]) == 3\n assert candidate([1, 2, 3, 4]) == 4\n\ndef test_check():\n check(pos_count)\n\ntest_check()\n"}
{"name": "mbpp_450_extract_string", "language": "py", "prompt": "from typing import List\n\ndef extract_string(str: List[str], l: int) -> List[str]:\n \"\"\"\n\tWrite a function to extract specified size of strings from a given list of string values.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_450_extract_string.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_string", "test": "def check(candidate):\n assert candidate(['Python', 'list', 'exercises', 'practice', 'solution'], 8) == ['practice', 'solution']\n assert candidate(['Python', 'list', 'exercises', 'practice', 'solution'], 6) == ['Python']\n assert candidate(['Python', 'list', 'exercises', 'practice', 'solution'], 9) == ['exercises']\n\ndef test_check():\n check(extract_string)\n\ntest_check()\n"}
{"name": "mbpp_444_trim_tuple", "language": "py", "prompt": "from typing import List\n\ndef trim_tuple(test_list: List[List[int]], K: int) -> List[List[int]]:\n \"\"\"\n\tWrite a function to trim each list by k in the given lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_444_trim_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "trim_tuple", "test": "def check(candidate):\n assert candidate([[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 2) == [[2], [9], [2], [2]]\n assert candidate([[5, 3, 2, 1, 4], [3, 4, 9, 2, 1], [9, 1, 2, 3, 5], [4, 8, 2, 1, 7]], 1) == [[3, 2, 1], [4, 9, 2], [1, 2, 3], [8, 2, 1]]\n assert candidate([[7, 8, 4, 9], [11, 8, 12, 4], [4, 1, 7, 8], [3, 6, 9, 7]], 1) == [[8, 4], [8, 12], [1, 7], [6, 9]]\n\ndef test_check():\n check(trim_tuple)\n\ntest_check()\n"}
{"name": "mbpp_439_multiple_to_single", "language": "py", "prompt": "from typing import List\n\ndef multiple_to_single(L: List[int]) -> int:\n \"\"\"\n\tWrite a function to join a list of multiple integers into a single integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_439_multiple_to_single.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "multiple_to_single", "test": "def check(candidate):\n assert candidate([11, 33, 50]) == 113350\n assert candidate([-1, 2, 3, 4, 5, 6]) == -123456\n assert candidate([10, 15, 20, 25]) == 10152025\n\ndef test_check():\n check(multiple_to_single)\n\ntest_check()\n"}
{"name": "mbpp_162_sum_series", "language": "py", "prompt": "def sum_series(n: int) -> int:\n \"\"\"\n\tWrite a function to calculate the sum (n - 2*i) from i=0 to n // 2, for instance n + (n-2) + (n-4)... (until n-x =< 0).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_162_sum_series.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_series", "test": "def check(candidate):\n assert candidate(6) == 12\n assert candidate(10) == 30\n assert candidate(9) == 25\n\ndef test_check():\n check(sum_series)\n\ntest_check()\n"}
{"name": "mbpp_224_count_Set_Bits", "language": "py", "prompt": "def count_Set_Bits(n: int) -> int:\n \"\"\"\n\tWrite a python function to count the number of set bits (binary digits with value 1) in a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_224_count_Set_Bits.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_Set_Bits", "test": "def check(candidate):\n assert candidate(2) == 1\n assert candidate(4) == 1\n assert candidate(6) == 2\n\ndef test_check():\n check(count_Set_Bits)\n\ntest_check()\n"}
{"name": "mbpp_309_maximum", "language": "py", "prompt": "def maximum(a: int, b: int) -> int:\n \"\"\"\n\tWrite a python function to find the maximum of two numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_309_maximum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "maximum", "test": "def check(candidate):\n assert candidate(5, 10) == 10\n assert candidate(-1, -2) == -1\n assert candidate(9, 7) == 9\n\ndef test_check():\n check(maximum)\n\ntest_check()\n"}
{"name": "mbpp_632_move_zero", "language": "py", "prompt": "from typing import List\n\ndef move_zero(num_list: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to move all zeroes to the end of the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_632_move_zero.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "move_zero", "test": "def check(candidate):\n assert candidate([1, 0, 2, 0, 3, 4]) == [1, 2, 3, 4, 0, 0]\n assert candidate([2, 3, 2, 0, 0, 4, 0, 5, 0]) == [2, 3, 2, 4, 5, 0, 0, 0, 0]\n assert candidate([0, 1, 0, 1, 1]) == [1, 1, 1, 0, 0]\n\ndef test_check():\n check(move_zero)\n\ntest_check()\n"}
{"name": "mbpp_168_frequency", "language": "py", "prompt": "from typing import List\n\ndef frequency(a: List[int], x: int) -> int:\n \"\"\"\n\tWrite a function to count the number of occurrences of a number in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_168_frequency.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "frequency", "test": "def check(candidate):\n assert candidate([1, 2, 3], 4) == 0\n assert candidate([1, 2, 2, 3, 3, 3, 4], 3) == 3\n assert candidate([0, 1, 2, 3, 1, 2], 1) == 2\n\ndef test_check():\n check(frequency)\n\ntest_check()\n"}
{"name": "mbpp_749_sort_numeric_strings", "language": "py", "prompt": "from typing import List\n\ndef sort_numeric_strings(nums_str: List[str]) -> List[int]:\n \"\"\"\n\tWrite a function to sort a given list of strings of numbers numerically. https://www.geeksforgeeks.org/python-sort-numeric-strings-in-a-list/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_749_sort_numeric_strings.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sort_numeric_strings", "test": "def check(candidate):\n assert candidate(['4', '12', '45', '7', '0', '100', '200', '-12', '-500']) == [-500, -12, 0, 4, 7, 12, 45, 100, 200]\n assert candidate(['2', '3', '8', '4', '7', '9', '8', '2', '6', '5', '1', '6', '1', '2', '3', '4', '6', '9', '1', '2']) == [1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 9]\n assert candidate(['1', '3', '5', '7', '1', '3', '13', '15', '17', '5', '7 ', '9', '1', '11']) == [1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 11, 13, 15, 17]\n\ndef test_check():\n check(sort_numeric_strings)\n\ntest_check()\n"}
{"name": "mbpp_97_frequency_lists", "language": "py", "prompt": "from typing import List, Dict\n\ndef frequency_lists(list1: List[List[int]]) -> Dict[int, int]:\n \"\"\"\n\tWrite a function to find frequency of each element in a flattened list of lists, returned in a dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_97_frequency_lists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "frequency_lists", "test": "def check(candidate):\n assert candidate([[1, 2, 3, 2], [4, 5, 6, 2], [7, 8, 9, 5]]) == { 1: 1, 2: 3, 3: 1, 4: 1, 5: 2, 6: 1, 7: 1, 8: 1, 9: 1 }\n assert candidate([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) == { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1 }\n assert candidate([[20, 30, 40, 17], [18, 16, 14, 13], [10, 20, 30, 40]]) == { 20: 2, 30: 2, 40: 2, 17: 1, 18: 1, 16: 1, 14: 1, 13: 1, 10: 1 }\n\ndef test_check():\n check(frequency_lists)\n\ntest_check()\n"}
{"name": "mbpp_429_and_tuples", "language": "py", "prompt": "from typing import Tuple\n\ndef and_tuples(test_tup1: Tuple[int, int, int, int], test_tup2: Tuple[int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function to extract the elementwise and tuples from the given two tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_429_and_tuples.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "and_tuples", "test": "def check(candidate):\n assert candidate((10, 4, 6, 9), (5, 2, 3, 3)) == (0, 0, 2, 1)\n assert candidate((1, 2, 3, 4), (5, 6, 7, 8)) == (1, 2, 3, 0)\n assert candidate((8, 9, 11, 12), (7, 13, 14, 17)) == (0, 9, 10, 0)\n\ndef test_check():\n check(and_tuples)\n\ntest_check()\n"}
{"name": "mbpp_759_is_decimal", "language": "py", "prompt": "def is_decimal(num: str) -> bool:\n \"\"\"\n\tWrite a function to check whether a given string is a decimal number with a precision of 2.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_759_is_decimal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_decimal", "test": "def check(candidate):\n assert candidate('123.11') == True\n assert candidate('e666.86') == False\n assert candidate('3.124587') == False\n assert candidate('1.11') == True\n assert candidate('1.1.11') == False\n\ndef test_check():\n check(is_decimal)\n\ntest_check()\n"}
{"name": "mbpp_599_sum_average", "language": "py", "prompt": "from typing import Tuple\n\ndef sum_average(number: int) -> Tuple[int, float]:\n \"\"\"\n\tWrite a function to find sum and average of first n natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_599_sum_average.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_average", "test": "def check(candidate):\n assert candidate(10) == (55, 5.5)\n assert candidate(15) == (120, 8.0)\n assert candidate(20) == (210, 10.5)\n\ndef test_check():\n check(sum_average)\n\ntest_check()\n"}
{"name": "mbpp_804_is_product_even", "language": "py", "prompt": "from typing import List\n\ndef is_product_even(arr: List[int]) -> bool:\n \"\"\"\n\tWrite a function to check whether the product of numbers in a list is even or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_804_is_product_even.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_product_even", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == True\n assert candidate([1, 2, 1, 4]) == True\n assert candidate([1, 1]) == False\n\ndef test_check():\n check(is_product_even)\n\ntest_check()\n"}
{"name": "mbpp_103_eulerian_num", "language": "py", "prompt": "def eulerian_num(n: int, m: int) -> int:\n \"\"\"\n\tWrite a function to find the Eulerian number a(n, m).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_103_eulerian_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "eulerian_num", "test": "def check(candidate):\n assert candidate(3, 1) == 4\n assert candidate(4, 1) == 11\n assert candidate(5, 3) == 26\n\ndef test_check():\n check(eulerian_num)\n\ntest_check()\n"}
{"name": "mbpp_391_convert_list_dictionary", "language": "py", "prompt": "from typing import List, Dict\n\ndef convert_list_dictionary(l1: List[str], l2: List[str], l3: List[int]) -> List[Dict[str, Dict[str, int]]]:\n \"\"\"\n\tWrite a function to convert more than one list to nested dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_391_convert_list_dictionary.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "convert_list_dictionary", "test": "def check(candidate):\n assert candidate(['S001', 'S002', 'S003', 'S004'], ['Adina Park', 'Leyton Marsh', 'Duncan Boyle', 'Saim Richards'], [85, 98, 89, 92]) == [{ 'S001': { 'Adina Park': 85 } }, { 'S002': { 'Leyton Marsh': 98 } }, { 'S003': { 'Duncan Boyle': 89 } }, { 'S004': { 'Saim Richards': 92 } }]\n assert candidate(['abc', 'def', 'ghi', 'jkl'], ['python', 'program', 'language', 'programs'], [100, 200, 300, 400]) == [{ 'abc': { 'python': 100 } }, { 'def': { 'program': 200 } }, { 'ghi': { 'language': 300 } }, { 'jkl': { 'programs': 400 } }]\n assert candidate(['A1', 'A2', 'A3', 'A4'], ['java', 'C', 'C++', 'DBMS'], [10, 20, 30, 40]) == [{ 'A1': { 'java': 10 } }, { 'A2': { 'C': 20 } }, { 'A3': { 'C++': 30 } }, { 'A4': { 'DBMS': 40 } }]\n\ndef test_check():\n check(convert_list_dictionary)\n\ntest_check()\n"}
{"name": "mbpp_635_heap_sort", "language": "py", "prompt": "from typing import List\n\ndef heap_sort(iterable: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to sort the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_635_heap_sort.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "heap_sort", "test": "def check(candidate):\n assert candidate([1, 3, 5, 7, 9, 2, 4, 6, 8, 0]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate([25, 35, 22, 85, 14, 65, 75, 25, 58]) == [14, 22, 25, 25, 35, 58, 65, 75, 85]\n assert candidate([7, 1, 9, 5]) == [1, 5, 7, 9]\n\ndef test_check():\n check(heap_sort)\n\ntest_check()\n"}
{"name": "mbpp_270_sum_even_and_even_index", "language": "py", "prompt": "from typing import List\n\ndef sum_even_and_even_index(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the sum of even numbers at even positions of a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_270_sum_even_and_even_index.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_even_and_even_index", "test": "def check(candidate):\n assert candidate([5, 6, 12, 1, 18, 8]) == 30\n assert candidate([3, 20, 17, 9, 2, 10, 18, 13, 6, 18]) == 26\n assert candidate([5, 6, 12, 1]) == 12\n\ndef test_check():\n check(sum_even_and_even_index)\n\ntest_check()\n"}
{"name": "mbpp_787_text_match_three", "language": "py", "prompt": "def text_match_three(text: str) -> bool:\n \"\"\"\n\tWrite a function that matches a string that has an a followed by three 'b'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_787_text_match_three.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_three", "test": "def check(candidate):\n assert candidate('ac') == False\n assert candidate('dc') == False\n assert candidate('abbbba') == True\n assert candidate('caacabbbba') == True\n\ndef test_check():\n check(text_match_three)\n\ntest_check()\n"}
{"name": "mbpp_765_is_polite", "language": "py", "prompt": "def is_polite(n: int) -> int:\n \"\"\"\n\tWrite a function to find nth polite number. geeksforgeeks.org/n-th-polite-number/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_765_is_polite.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_polite", "test": "def check(candidate):\n assert candidate(7) == 11\n assert candidate(4) == 7\n assert candidate(9) == 13\n\ndef test_check():\n check(is_polite)\n\ntest_check()\n"}
{"name": "mbpp_459_remove_uppercase", "language": "py", "prompt": "def remove_uppercase(str1: str) -> str:\n \"\"\"\n\tWrite a function to remove uppercase substrings from a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_459_remove_uppercase.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_uppercase", "test": "def check(candidate):\n assert candidate('cAstyoUrFavoRitETVshoWs') == 'cstyoravoitshos'\n assert candidate('wAtchTheinTernEtrAdIo') == 'wtchheinerntrdo'\n assert candidate('VoicESeaRchAndreComMendaTionS') == 'oiceachndreomendaion'\n\ndef test_check():\n check(remove_uppercase)\n\ntest_check()\n"}
{"name": "mbpp_16_text_lowercase_underscore", "language": "py", "prompt": "def text_lowercase_underscore(text: str) -> bool:\n \"\"\"\n\tWrite a function to that returns true if the input string contains sequences of lowercase letters joined with an underscore and false otherwise.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_16_text_lowercase_underscore.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_lowercase_underscore", "test": "def check(candidate):\n assert candidate('aab_cbbbc') == True\n assert candidate('aab_Abbbc') == False\n assert candidate('Aaab_abbbc') == False\n\ndef test_check():\n check(text_lowercase_underscore)\n\ntest_check()\n"}
{"name": "mbpp_731_lateralsurface_cone", "language": "py", "prompt": "def lateralsurface_cone(r: int, h: int) -> float:\n \"\"\"\n\tWrite a function to find the lateral surface area of a cone given radius r and the height h.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_731_lateralsurface_cone.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "lateralsurface_cone", "test": "def check(candidate):\n assert candidate(5, 12) == 204.20352248333654\n assert candidate(10, 15) == 566.3586699569488\n assert candidate(19, 17) == 1521.8090132193388\n\ndef test_check():\n check(lateralsurface_cone)\n\ntest_check()\n"}
{"name": "mbpp_802_count_rotation", "language": "py", "prompt": "from typing import List\n\ndef count_rotation(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to count the number of rotations required to generate a sorted array. https://www.geeksforgeeks.org/count-of-rotations-required-to-generate-a-sorted-array/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_802_count_rotation.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_rotation", "test": "def check(candidate):\n assert candidate([3, 2, 1]) == 1\n assert candidate([4, 5, 1, 2, 3]) == 2\n assert candidate([7, 8, 9, 1, 2, 3]) == 3\n assert candidate([1, 2, 3]) == 0\n assert candidate([1, 3, 2]) == 2\n\ndef test_check():\n check(count_rotation)\n\ntest_check()\n"}
{"name": "mbpp_782_odd_length_sum", "language": "py", "prompt": "from typing import List\n\ndef odd_length_sum(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the sum of all odd length subarrays. https://www.geeksforgeeks.org/sum-of-all-odd-length-subarrays/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_782_odd_length_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "odd_length_sum", "test": "def check(candidate):\n assert candidate([1, 2, 4]) == 14\n assert candidate([1, 2, 1, 2]) == 15\n assert candidate([1, 7]) == 8\n\ndef test_check():\n check(odd_length_sum)\n\ntest_check()\n"}
{"name": "mbpp_470_add_pairwise", "language": "py", "prompt": "from typing import Tuple\n\ndef add_pairwise(test_tup: Tuple[int, int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function to find the pairwise addition of the neighboring elements of the given tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_470_add_pairwise.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_pairwise", "test": "def check(candidate):\n assert candidate((1, 5, 7, 8, 10)) == (6, 12, 15, 18)\n assert candidate((2, 6, 8, 9, 11)) == (8, 14, 17, 20)\n assert candidate((3, 7, 9, 10, 12)) == (10, 16, 19, 22)\n\ndef test_check():\n check(add_pairwise)\n\ntest_check()\n"}
{"name": "mbpp_17_square_perimeter", "language": "py", "prompt": "def square_perimeter(a: int) -> int:\n \"\"\"\n\tWrite a function that returns the perimeter of a square given its side length as input.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_17_square_perimeter.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "square_perimeter", "test": "def check(candidate):\n assert candidate(10) == 40\n assert candidate(5) == 20\n assert candidate(4) == 16\n\ndef test_check():\n check(square_perimeter)\n\ntest_check()\n"}
{"name": "mbpp_228_all_Bits_Set_In_The_Given_Range", "language": "py", "prompt": "def all_Bits_Set_In_The_Given_Range(n: int, l: int, r: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether all the bits are unset in the given range or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_228_all_Bits_Set_In_The_Given_Range.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "all_Bits_Set_In_The_Given_Range", "test": "def check(candidate):\n assert candidate(4, 1, 2) == True\n assert candidate(17, 2, 4) == True\n assert candidate(39, 4, 6) == False\n\ndef test_check():\n check(all_Bits_Set_In_The_Given_Range)\n\ntest_check()\n"}
{"name": "mbpp_240_replace_list", "language": "py", "prompt": "from typing import List, Any\n\ndef replace_list(list1: List[Any], list2: List[Any]) -> List[Any]:\n \"\"\"\n\tWrite a function that takes in two lists and replaces the last element of the first list with the elements of the second list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_240_replace_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_list", "test": "def check(candidate):\n assert candidate([1, 3, 5, 7, 9, 10], [2, 4, 6, 8]) == [1, 3, 5, 7, 9, 2, 4, 6, 8]\n assert candidate([1, 2, 3, 4, 5], [5, 6, 7, 8]) == [1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(['red', 'blue', 'green'], ['yellow']) == ['red', 'blue', 'yellow']\n\ndef test_check():\n check(replace_list)\n\ntest_check()\n"}
{"name": "mbpp_447_cube_nums", "language": "py", "prompt": "from typing import List\n\ndef cube_nums(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to find cubes of individual elements in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_447_cube_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "cube_nums", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]\n assert candidate([10, 20, 30]) == [1000, 8000, 27000]\n assert candidate([12, 15]) == [1728, 3375]\n\ndef test_check():\n check(cube_nums)\n\ntest_check()\n"}
{"name": "mbpp_261_division_elements", "language": "py", "prompt": "from typing import Tuple\n\ndef division_elements(test_tup1: Tuple[int, int, int, int], test_tup2: Tuple[int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function that takes in two tuples and performs mathematical division operation element-wise across the given tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_261_division_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "division_elements", "test": "def check(candidate):\n assert candidate((10, 4, 6, 9), (5, 2, 3, 3)) == (2, 2, 2, 3)\n assert candidate((12, 6, 8, 16), (6, 3, 4, 4)) == (2, 2, 2, 4)\n assert candidate((20, 14, 36, 18), (5, 7, 6, 9)) == (4, 2, 6, 2)\n\ndef test_check():\n check(division_elements)\n\ntest_check()\n"}
{"name": "mbpp_581_surface_Area", "language": "py", "prompt": "def surface_Area(b: int, s: int) -> int:\n \"\"\"\n\tWrite a python function to find the surface area of a square pyramid with a given base edge and height.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_581_surface_Area.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "surface_Area", "test": "def check(candidate):\n assert candidate(3, 4) == 33\n assert candidate(4, 5) == 56\n assert candidate(1, 2) == 5\n\ndef test_check():\n check(surface_Area)\n\ntest_check()\n"}
{"name": "mbpp_283_validate", "language": "py", "prompt": "def validate(n: int) -> bool:\n \"\"\"\n\tWrite a python function takes in an integer and check whether the frequency of each digit in the integer is less than or equal to the digit itself.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_283_validate.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "validate", "test": "def check(candidate):\n assert candidate(1234) == True\n assert candidate(51241) == False\n assert candidate(321) == True\n\ndef test_check():\n check(validate)\n\ntest_check()\n"}
{"name": "mbpp_284_check_element", "language": "py", "prompt": "from typing import List, Any\n\ndef check_element(list: List[Any], element: Any) -> bool:\n \"\"\"\n\tWrite a function that takes in a list and element and checks whether all items in the list are equal to the given element.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_284_check_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_element", "test": "def check(candidate):\n assert candidate(['green', 'orange', 'black', 'white'], 'blue') == False\n assert candidate([1, 2, 3, 4], 7) == False\n assert candidate(['green', 'green', 'green', 'green'], 'green') == True\n\ndef test_check():\n check(check_element)\n\ntest_check()\n"}
{"name": "mbpp_101_kth_element", "language": "py", "prompt": "from typing import List\n\ndef kth_element(arr: List[int], k: int) -> int:\n \"\"\"\n\tWrite a function to find the kth element in the given array using 1-based indexing.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_101_kth_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "kth_element", "test": "def check(candidate):\n assert candidate([12, 3, 5, 7, 19], 2) == 3\n assert candidate([17, 24, 8, 23], 3) == 8\n assert candidate([16, 21, 25, 36, 4], 4) == 36\n\ndef test_check():\n check(kth_element)\n\ntest_check()\n"}
{"name": "mbpp_461_upper_ctr", "language": "py", "prompt": "def upper_ctr(str: str) -> int:\n \"\"\"\n\tWrite a python function to count the upper case characters in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_461_upper_ctr.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "upper_ctr", "test": "def check(candidate):\n assert candidate('PYthon') == 1\n assert candidate('BigData') == 1\n assert candidate('program') == 0\n\ndef test_check():\n check(upper_ctr)\n\ntest_check()\n"}
{"name": "mbpp_593_removezero_ip", "language": "py", "prompt": "def removezero_ip(ip: str) -> str:\n \"\"\"\n\tWrite a function to remove leading zeroes from an ip address.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_593_removezero_ip.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "removezero_ip", "test": "def check(candidate):\n assert candidate('216.08.094.196') == '216.8.94.196'\n assert candidate('12.01.024') == '12.1.24'\n assert candidate('216.08.094.0196') == '216.8.94.196'\n\ndef test_check():\n check(removezero_ip)\n\ntest_check()\n"}
{"name": "mbpp_788_new_tuple", "language": "py", "prompt": "from typing import List, Tuple\n\ndef new_tuple(test_list: List[str], test_str: str) -> Tuple[str, str, str]:\n \"\"\"\n\tWrite a function to create a new tuple from the given string and list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_788_new_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "new_tuple", "test": "def check(candidate):\n assert candidate(['WEB', 'is'], 'best') == ('WEB', 'is', 'best')\n assert candidate(['We', 'are'], 'Developers') == ('We', 'are', 'Developers')\n assert candidate(['Part', 'is'], 'Wrong') == ('Part', 'is', 'Wrong')\n\ndef test_check():\n check(new_tuple)\n\ntest_check()\n"}
{"name": "mbpp_777_find_sum", "language": "py", "prompt": "from typing import List\n\ndef find_sum(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the sum of non-repeated elements in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_777_find_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_sum", "test": "def check(candidate):\n assert candidate([1, 2, 3, 1, 1, 4, 5, 6]) == 21\n assert candidate([1, 10, 9, 4, 2, 10, 10, 45, 4]) == 71\n assert candidate([12, 10, 9, 45, 2, 10, 10, 45, 10]) == 78\n\ndef test_check():\n check(find_sum)\n\ntest_check()\n"}
{"name": "mbpp_586_split_Arr", "language": "py", "prompt": "from typing import List\n\ndef split_Arr(l: List[int], n: int) -> List[int]:\n \"\"\"\n\tWrite a python function to split a list at the nth eelment and add the first part to the end.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_586_split_Arr.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "split_Arr", "test": "def check(candidate):\n assert candidate([12, 10, 5, 6, 52, 36], 2) == [5, 6, 52, 36, 12, 10]\n assert candidate([1, 2, 3, 4], 1) == [2, 3, 4, 1]\n assert candidate([0, 1, 2, 3, 4, 5, 6, 7], 3) == [3, 4, 5, 6, 7, 0, 1, 2]\n\ndef test_check():\n check(split_Arr)\n\ntest_check()\n"}
{"name": "mbpp_104_sort_sublists", "language": "py", "prompt": "from typing import List\n\ndef sort_sublists(input_list: List[List[str]]) -> List[List[str]]:\n \"\"\"\n\tWrite a function to sort each sublist of strings in a given list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_104_sort_sublists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sort_sublists", "test": "def check(candidate):\n assert candidate([['green', 'orange'], ['black', 'white'], ['white', 'black', 'orange']]) == [['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']]\n assert candidate([[' red ', 'green'], ['blue ', ' black'], [' orange', 'brown']]) == [[' red ', 'green'], [' black', 'blue '], [' orange', 'brown']]\n assert candidate([['zilver', 'gold'], ['magnesium', 'aluminium'], ['steel', 'bronze']]) == [['gold', 'zilver'], ['aluminium', 'magnesium'], ['bronze', 'steel']]\n\ndef test_check():\n check(sort_sublists)\n\ntest_check()\n"}
{"name": "mbpp_472_check_Consecutive", "language": "py", "prompt": "from typing import List\n\ndef check_Consecutive(l: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given list contains consecutive numbers or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_472_check_Consecutive.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_Consecutive", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5]) == True\n assert candidate([1, 2, 3, 5, 6]) == False\n assert candidate([1, 2, 1]) == False\n\ndef test_check():\n check(check_Consecutive)\n\ntest_check()\n"}
{"name": "mbpp_310_string_to_tuple", "language": "py", "prompt": "from typing import List\n\ndef string_to_tuple(str1: str) -> List[str]:\n \"\"\"\n\tWrite a function to convert a given string to a list of characters.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_310_string_to_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "string_to_tuple", "test": "def check(candidate):\n assert candidate('python 3.0') == ['p', 'y', 't', 'h', 'o', 'n', '3', '.', '0']\n assert candidate('item1') == ['i', 't', 'e', 'm', '1']\n assert candidate('15.10') == ['1', '5', '.', '1', '0']\n\ndef test_check():\n check(string_to_tuple)\n\ntest_check()\n"}
{"name": "mbpp_266_lateralsurface_cube", "language": "py", "prompt": "def lateralsurface_cube(l: int) -> int:\n \"\"\"\n\tWrite a function to find the lateral surface area of a cube given its side length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_266_lateralsurface_cube.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "lateralsurface_cube", "test": "def check(candidate):\n assert candidate(5) == 100\n assert candidate(9) == 324\n assert candidate(10) == 400\n\ndef test_check():\n check(lateralsurface_cube)\n\ntest_check()\n"}
{"name": "mbpp_271_even_Power_Sum", "language": "py", "prompt": "def even_Power_Sum(n: int) -> int:\n \"\"\"\n\tWrite a python function that takes in an integer n and finds the sum of the first n even natural numbers that are raised to the fifth power.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_271_even_Power_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "even_Power_Sum", "test": "def check(candidate):\n assert candidate(2) == 1056\n assert candidate(3) == 8832\n assert candidate(1) == 32\n\ndef test_check():\n check(even_Power_Sum)\n\ntest_check()\n"}
{"name": "mbpp_238_number_of_substrings", "language": "py", "prompt": "def number_of_substrings(str: str) -> int:\n \"\"\"\n\tWrite a python function to count the number of non-empty substrings of a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_238_number_of_substrings.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "number_of_substrings", "test": "def check(candidate):\n assert candidate('abc') == 6\n assert candidate('abcd') == 10\n assert candidate('abcde') == 15\n\ndef test_check():\n check(number_of_substrings)\n\ntest_check()\n"}
{"name": "mbpp_592_sum_Of_product", "language": "py", "prompt": "def sum_Of_product(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of the product of consecutive binomial co-efficients.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_592_sum_Of_product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_Of_product", "test": "def check(candidate):\n assert candidate(3) == 15\n assert candidate(4) == 56\n assert candidate(1) == 1\n\ndef test_check():\n check(sum_Of_product)\n\ntest_check()\n"}
{"name": "mbpp_74_is_samepatterns", "language": "py", "prompt": "from typing import List\n\ndef is_samepatterns(colors: List[str], patterns: List[str]) -> bool:\n \"\"\"\n\tWrite a function to check whether it follows the sequence given in the patterns array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_74_is_samepatterns.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_samepatterns", "test": "def check(candidate):\n assert candidate(['red', 'green', 'green'], ['a', 'b', 'b']) == True\n assert candidate(['red', 'green', 'greenn'], ['a', 'b', 'b']) == False\n assert candidate(['red', 'green', 'greenn'], ['a', 'b']) == False\n\ndef test_check():\n check(is_samepatterns)\n\ntest_check()\n"}
{"name": "mbpp_415_max_Product", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_Product(arr: List[int]) -> Tuple[int, int]:\n \"\"\"\n\tWrite a python function to find a pair with highest product from a given array of integers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_415_max_Product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_Product", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 7, 0, 8, 4]) == (7, 8)\n assert candidate([0, -1, -2, -4, 5, 0, -6]) == (-4, -6)\n assert candidate([1, 2, 3]) == (2, 3)\n\ndef test_check():\n check(max_Product)\n\ntest_check()\n"}
{"name": "mbpp_781_count_divisors", "language": "py", "prompt": "def count_divisors(n: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the count of divisors is even. https://www.w3resource.com/python-exercises/basic/python-basic-1-exercise-24.php\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_781_count_divisors.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_divisors", "test": "def check(candidate):\n assert candidate(10) == True\n assert candidate(100) == False\n assert candidate(125) == True\n\ndef test_check():\n check(count_divisors)\n\ntest_check()\n"}
{"name": "mbpp_441_surfacearea_cube", "language": "py", "prompt": "def surfacearea_cube(l: int) -> int:\n \"\"\"\n\tWrite a function to find the surface area of a cube of a given size.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_441_surfacearea_cube.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "surfacearea_cube", "test": "def check(candidate):\n assert candidate(5) == 150\n assert candidate(3) == 54\n assert candidate(10) == 600\n\ndef test_check():\n check(surfacearea_cube)\n\ntest_check()\n"}
{"name": "mbpp_396_check_char", "language": "py", "prompt": "def check_char(string: str) -> str:\n \"\"\"\n\tWrite a function to check whether the given string starts and ends with the same character or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_396_check_char.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_char", "test": "def check(candidate):\n assert candidate('abba') == 'Valid'\n assert candidate('a') == 'Valid'\n assert candidate('abcd') == 'Invalid'\n\ndef test_check():\n check(check_char)\n\ntest_check()\n"}
{"name": "mbpp_757_count_reverse_pairs", "language": "py", "prompt": "from typing import List\n\ndef count_reverse_pairs(test_list: List[str]) -> int:\n \"\"\"\n\tWrite a function to count the pairs of reverse strings in the given string list. https://www.geeksforgeeks.org/python-program-to-count-the-pairs-of-reverse-strings/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_757_count_reverse_pairs.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_reverse_pairs", "test": "def check(candidate):\n assert candidate(['julia', 'best', 'tseb', 'for', 'ailuj']) == 2\n assert candidate(['geeks', 'best', 'for', 'skeeg']) == 1\n assert candidate(['makes', 'best', 'sekam', 'for', 'rof']) == 2\n\ndef test_check():\n check(count_reverse_pairs)\n\ntest_check()\n"}
{"name": "mbpp_75_find_tuples", "language": "py", "prompt": "from typing import List, Tuple\n\ndef find_tuples(test_list: List[Tuple[int, int, int]], K: int) -> List[Tuple[int, int, int]]:\n \"\"\"\n\tWrite a function to find tuples which have all elements divisible by k from the given list of tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_75_find_tuples.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_tuples", "test": "def check(candidate):\n assert candidate([(6, 24, 12), (7, 9, 6), (12, 18, 21)], 6) == [(6, 24, 12)]\n assert candidate([(5, 25, 30), (4, 2, 3), (7, 8, 9)], 5) == [(5, 25, 30)]\n assert candidate([(7, 9, 16), (8, 16, 4), (19, 17, 18)], 4) == [(8, 16, 4)]\n\ndef test_check():\n check(find_tuples)\n\ntest_check()\n"}
{"name": "mbpp_785_tuple_str_int", "language": "py", "prompt": "from typing import Tuple\n\ndef tuple_str_int(test_str: str) -> Tuple[int, int, int]:\n \"\"\"\n\tWrite a function to convert tuple string to integer tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_785_tuple_str_int.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tuple_str_int", "test": "def check(candidate):\n assert candidate('(7, 8, 9)') == (7, 8, 9)\n assert candidate('(1, 2, 3)') == (1, 2, 3)\n assert candidate('(4, 5, 6)') == (4, 5, 6)\n assert candidate('(7, 81, 19)') == (7, 81, 19)\n\ndef test_check():\n check(tuple_str_int)\n\ntest_check()\n"}
{"name": "mbpp_776_count_vowels", "language": "py", "prompt": "def count_vowels(test_str: str) -> int:\n \"\"\"\n\tWrite a function to count those characters which have vowels as their neighbors in the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_776_count_vowels.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_vowels", "test": "def check(candidate):\n assert candidate('bestinstareels') == 7\n assert candidate('partofthejourneyistheend') == 12\n assert candidate('amazonprime') == 5\n\ndef test_check():\n check(count_vowels)\n\ntest_check()\n"}
{"name": "mbpp_277_dict_filter", "language": "py", "prompt": "from typing import Dict\n\ndef dict_filter(dict: Dict[str, int], n: int) -> Dict[str, int]:\n \"\"\"\n\tWrite a function that takes in a dictionary and integer n and filters the dictionary to only include entries with values greater than or equal to n.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_277_dict_filter.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "dict_filter", "test": "def check(candidate):\n assert candidate({ 'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190 }, 170) == { 'Cierra Vega': 175, 'Alden Cantrell': 180, 'Pierre Cox': 190 }\n assert candidate({ 'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190 }, 180) == { 'Alden Cantrell': 180, 'Pierre Cox': 190 }\n assert candidate({ 'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190 }, 190) == { 'Pierre Cox': 190 }\n\ndef test_check():\n check(dict_filter)\n\ntest_check()\n"}
{"name": "mbpp_468_max_product", "language": "py", "prompt": "from typing import List\n\ndef max_product(arr: List[int]) -> int:\n \"\"\"\n\tWrite a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_468_max_product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_product", "test": "def check(candidate):\n assert candidate([3, 100, 4, 5, 150, 6]) == 3000\n assert candidate([4, 42, 55, 68, 80]) == 50265600\n assert candidate([10, 22, 9, 33, 21, 50, 41, 60]) == 2460\n\ndef test_check():\n check(max_product)\n\ntest_check()\n"}
{"name": "mbpp_279_is_num_decagonal", "language": "py", "prompt": "def is_num_decagonal(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth decagonal number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_279_is_num_decagonal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_num_decagonal", "test": "def check(candidate):\n assert candidate(3) == 27\n assert candidate(7) == 175\n assert candidate(10) == 370\n\ndef test_check():\n check(is_num_decagonal)\n\ntest_check()\n"}
{"name": "mbpp_3_is_not_prime", "language": "py", "prompt": "def is_not_prime(n: int) -> bool:\n \"\"\"\n\tWrite a python function to identify non-prime numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_3_is_not_prime.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_not_prime", "test": "def check(candidate):\n assert candidate(2) == False\n assert candidate(10) == True\n assert candidate(35) == True\n assert candidate(37) == False\n\ndef test_check():\n check(is_not_prime)\n\ntest_check()\n"}
{"name": "mbpp_88_freq_count", "language": "py", "prompt": "from typing import List, Dict\n\ndef freq_count(list1: List[int]) -> Dict[int, int]:\n \"\"\"\n\tWrite a function to get the frequency of all the elements in a list, returned as a dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_88_freq_count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "freq_count", "test": "def check(candidate):\n assert candidate([10, 10, 10, 10, 20, 20, 20, 20, 40, 40, 50, 50, 30]) == { 10: 4, 20: 4, 40: 2, 50: 2, 30: 1 }\n assert candidate([1, 2, 3, 4, 3, 2, 4, 1, 3, 1, 4]) == { 1: 3, 2: 2, 3: 3, 4: 3 }\n assert candidate([5, 6, 7, 4, 9, 10, 4, 5, 6, 7, 9, 5]) == { 10: 1, 5: 3, 6: 2, 7: 2, 4: 2, 9: 2 }\n\ndef test_check():\n check(freq_count)\n\ntest_check()\n"}
{"name": "mbpp_259_maximize_elements", "language": "py", "prompt": "from typing import List\n\ndef maximize_elements(test_tup1: List[List[int]], test_tup2: List[List[int]]) -> List[List[int]]:\n \"\"\"\n\tWrite a function to maximize the given two lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_259_maximize_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "maximize_elements", "test": "def check(candidate):\n assert candidate([[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]) == [[6, 7], [4, 9], [2, 9], [7, 10]]\n assert candidate([[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]) == [[7, 8], [5, 10], [3, 10], [8, 11]]\n assert candidate([[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]) == [[8, 9], [6, 11], [4, 11], [9, 12]]\n\ndef test_check():\n check(maximize_elements)\n\ntest_check()\n"}
{"name": "mbpp_568_empty_list", "language": "py", "prompt": "from typing import List, Dict\n\ndef empty_list(length: int) -> List[Dict[None, None]]:\n \"\"\"\n\tWrite a function to create a list of N empty dictionaries.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_568_empty_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "empty_list", "test": "def check(candidate):\n assert candidate(5) == [{ }, { }, { }, { }, { }]\n assert candidate(6) == [{ }, { }, { }, { }, { }, { }]\n assert candidate(7) == [{ }, { }, { }, { }, { }, { }, { }]\n\ndef test_check():\n check(empty_list)\n\ntest_check()\n"}
{"name": "mbpp_285_text_match_two_three", "language": "py", "prompt": "def text_match_two_three(text: str) -> bool:\n \"\"\"\n\tWrite a function that checks whether a string contains the 'a' character followed by two or three 'b' characters.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_285_text_match_two_three.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_two_three", "test": "def check(candidate):\n assert candidate('ac') == False\n assert candidate('dc') == False\n assert candidate('abbbba') == True\n\ndef test_check():\n check(text_match_two_three)\n\ntest_check()\n"}
{"name": "mbpp_721_maxAverageOfPath", "language": "py", "prompt": "from typing import List\n\ndef maxAverageOfPath(cost: List[List[int]]) -> float:\n \"\"\"\n\tGiven a square matrix of size N*N given as a list of lists, where each cell is associated with a specific cost. A path is defined as a specific sequence of cells that starts from the top-left cell move only right or down and ends on bottom right cell. We want to find a path with the maximum average over all existing paths. Average is computed as total cost divided by the number of cells visited in the path.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_721_maxAverageOfPath.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "maxAverageOfPath", "test": "def check(candidate):\n assert candidate([[1, 2, 3], [6, 5, 4], [7, 3, 9]]) == 5.2\n assert candidate([[2, 3, 4], [7, 6, 5], [8, 4, 10]]) == 6.2\n assert candidate([[3, 4, 5], [8, 7, 6], [9, 5, 11]]) == 7.2\n assert candidate([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == 5.8\n\ndef test_check():\n check(maxAverageOfPath)\n\ntest_check()\n"}
{"name": "mbpp_797_sum_in_range", "language": "py", "prompt": "def sum_in_range(l: int, r: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of all odd natural numbers within the range l and r.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_797_sum_in_range.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_in_range", "test": "def check(candidate):\n assert candidate(2, 5) == 8\n assert candidate(5, 7) == 12\n assert candidate(7, 13) == 40\n\ndef test_check():\n check(sum_in_range)\n\ntest_check()\n"}
{"name": "mbpp_4_heap_queue_largest", "language": "py", "prompt": "from typing import List\n\ndef heap_queue_largest(nums: List[int], n: int) -> List[int]:\n \"\"\"\n\tWrite a function to find the n largest integers from a given list of numbers, returned in descending order.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_4_heap_queue_largest.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "heap_queue_largest", "test": "def check(candidate):\n assert candidate([25, 35, 22, 85, 14, 65, 75, 22, 58], 3) == [85, 75, 65]\n assert candidate([25, 35, 22, 85, 14, 65, 75, 22, 58], 2) == [85, 75]\n assert candidate([25, 35, 22, 85, 14, 65, 75, 22, 58], 5) == [85, 75, 65, 58, 35]\n\ndef test_check():\n check(heap_queue_largest)\n\ntest_check()\n"}
{"name": "mbpp_120_max_product_tuple", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_product_tuple(list1: List[Tuple[int, int]]) -> int:\n \"\"\"\n\tWrite a function to find the maximum absolute product between numbers in pairs of tuples within a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_120_max_product_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_product_tuple", "test": "def check(candidate):\n assert candidate([(2, 7), (2, 6), (1, 8), (4, 9)]) == 36\n assert candidate([(10, 20), (15, 2), (5, 10)]) == 200\n assert candidate([(11, 44), (10, 15), (20, 5), (12, 9)]) == 484\n\ndef test_check():\n check(max_product_tuple)\n\ntest_check()\n"}
{"name": "mbpp_230_replace_blank", "language": "py", "prompt": "def replace_blank(str1: str, char: str) -> str:\n \"\"\"\n\tWrite a function that takes in a string and character, replaces blank spaces in the string with the character, and returns the string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_230_replace_blank.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_blank", "test": "def check(candidate):\n assert candidate('hello people', '@') == 'hello@people'\n assert candidate('python program language', '$') == 'python$program$language'\n assert candidate('blank space', '-') == 'blank-space'\n\ndef test_check():\n check(replace_blank)\n\ntest_check()\n"}
{"name": "mbpp_600_is_Even", "language": "py", "prompt": "def is_Even(n: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given number is even or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_600_is_Even.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_Even", "test": "def check(candidate):\n assert candidate(1) == False\n assert candidate(2) == True\n assert candidate(3) == False\n\ndef test_check():\n check(is_Even)\n\ntest_check()\n"}
{"name": "mbpp_440_find_adverb_position", "language": "py", "prompt": "from typing import Tuple\n\ndef find_adverb_position(text: str) -> Tuple[int, int, str]:\n \"\"\"\n\tWrite a function to find the first adverb and their positions in a given sentence.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_440_find_adverb_position.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_adverb_position", "test": "def check(candidate):\n assert candidate('clearly!! we can see the sky') == (0, 7, 'clearly')\n assert candidate('seriously!! there are many roses') == (0, 9, 'seriously')\n assert candidate('unfortunately!! sita is going to home') == (0, 13, 'unfortunately')\n\ndef test_check():\n check(find_adverb_position)\n\ntest_check()\n"}
{"name": "mbpp_773_occurance_substring", "language": "py", "prompt": "from typing import Optional, Tuple\n\ndef occurance_substring(text: str, pattern: str) -> Optional[Tuple[str, int, int]]:\n \"\"\"\n\tWrite a function to find the occurrence and position of the substrings within a string. Return None if there is no match.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_773_occurance_substring.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "occurance_substring", "test": "def check(candidate):\n assert candidate('python programming, python language', 'python') == ('python', 0, 6)\n assert candidate('python programming,programming language', 'programming') == ('programming', 7, 18)\n assert candidate('python programming,programming language', 'language') == ('language', 31, 39)\n assert candidate('c++ programming, c++ language', 'python') == None\n\ndef test_check():\n check(occurance_substring)\n\ntest_check()\n"}
{"name": "mbpp_239_get_total_number_of_sequences", "language": "py", "prompt": "def get_total_number_of_sequences(m: int, n: int) -> int:\n \"\"\"\n\tWrite a function that takes in positive integers m and n and finds the number of possible sequences of length n, such that each element is a positive integer and is greater than or equal to twice the previous element but less than or equal to m.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_239_get_total_number_of_sequences.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_total_number_of_sequences", "test": "def check(candidate):\n assert candidate(10, 4) == 4\n assert candidate(5, 2) == 6\n assert candidate(16, 3) == 84\n\ndef test_check():\n check(get_total_number_of_sequences)\n\ntest_check()\n"}
{"name": "mbpp_265_list_split", "language": "py", "prompt": "from typing import List, Any\n\ndef list_split(S: List[Any], step: int) -> List[List[Any]]:\n \"\"\"\n\tWrite a function that takes in a list and an integer n and splits a list for every nth element, returning a list of the resulting lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_265_list_split.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "list_split", "test": "def check(candidate):\n assert candidate(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n'], 3) == [['a', 'd', 'g', 'j', 'm'], ['b', 'e', 'h', 'k', 'n'], ['c', 'f', 'i', 'l']]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], 3) == [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12]]\n assert candidate(['python', 'java', 'C', 'C++', 'DBMS', 'SQL'], 2) == [['python', 'C', 'DBMS'], ['java', 'C++', 'SQL']]\n\ndef test_check():\n check(list_split)\n\ntest_check()\n"}
{"name": "mbpp_412_remove_odd", "language": "py", "prompt": "from typing import List\n\ndef remove_odd(l: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to remove odd numbers from a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_412_remove_odd.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_odd", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == [2]\n assert candidate([2, 4, 6]) == [2, 4, 6]\n assert candidate([10, 20, 3]) == [10, 20]\n\ndef test_check():\n check(remove_odd)\n\ntest_check()\n"}
{"name": "mbpp_414_overlapping", "language": "py", "prompt": "from typing import List\n\ndef overlapping(list1: List[int], list2: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether any value in a sequence exists in a sequence or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_414_overlapping.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "overlapping", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5], [6, 7, 8, 9]) == False\n assert candidate([1, 2, 3], [4, 5, 6]) == False\n assert candidate([1, 4, 5], [1, 4, 5]) == True\n\ndef test_check():\n check(overlapping)\n\ntest_check()\n"}
{"name": "mbpp_160_find_solution", "language": "py", "prompt": "from typing import Optional, Tuple\n\ndef find_solution(a: int, b: int, n: int) -> Optional[Tuple[int, int]]:\n \"\"\"\n\tWrite a function that returns integers x and y that satisfy ax + by = n as a tuple, or return None if no solution exists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_160_find_solution.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_solution", "test": "def check(candidate):\n assert candidate(2, 3, 7) == (2, 1)\n assert candidate(4, 2, 7) == None\n assert candidate(1, 13, 17) == (4, 1)\n\ndef test_check():\n check(find_solution)\n\ntest_check()\n"}
{"name": "mbpp_559_max_sub_array_sum", "language": "py", "prompt": "from typing import List\n\ndef max_sub_array_sum(a: List[int], size: int) -> int:\n \"\"\"\n\tWrite a function to find the sum of the largest contiguous sublist in the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_559_max_sub_array_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_sub_array_sum", "test": "def check(candidate):\n assert candidate([-2, -3, 4, -1, -2, 1, 5, -3], 8) == 7\n assert candidate([-3, -4, 5, -2, -3, 2, 6, -4], 8) == 8\n assert candidate([-4, -5, 6, -3, -4, 3, 7, -5], 8) == 10\n\ndef test_check():\n check(max_sub_array_sum)\n\ntest_check()\n"}
{"name": "mbpp_809_check_smaller", "language": "py", "prompt": "from typing import Tuple\n\ndef check_smaller(test_tup1: Tuple[int, int, int], test_tup2: Tuple[int, int, int]) -> bool:\n \"\"\"\n\tWrite a function to check if each element of second tuple is smaller than its corresponding element in the first tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_809_check_smaller.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_smaller", "test": "def check(candidate):\n assert candidate((1, 2, 3), (2, 3, 4)) == False\n assert candidate((4, 5, 6), (3, 4, 5)) == True\n assert candidate((11, 12, 13), (10, 11, 12)) == True\n\ndef test_check():\n check(check_smaller)\n\ntest_check()\n"}
{"name": "mbpp_629_Split", "language": "py", "prompt": "from typing import List\n\ndef Split(list: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to find even numbers from a list of numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_629_Split.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Split", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5]) == [2, 4]\n assert candidate([4, 5, 6, 7, 8, 0, 1]) == [4, 6, 8, 0]\n assert candidate([8, 12, 15, 19]) == [8, 12]\n\ndef test_check():\n check(Split)\n\ntest_check()\n"}
{"name": "mbpp_723_count_same_pair", "language": "py", "prompt": "from typing import List\n\ndef count_same_pair(nums1: List[int], nums2: List[int]) -> int:\n \"\"\"\n\tThe input is defined as two lists of the same length. Write a function to count indices where the lists have the same values.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_723_count_same_pair.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_same_pair", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9]) == 4\n assert candidate([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]) == 11\n assert candidate([2, 4, -6, -9, 11, -12, 14, -5, 17], [2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]) == 1\n assert candidate([0, 1, 1, 2], [0, 1, 2, 2]) == 3\n\ndef test_check():\n check(count_same_pair)\n\ntest_check()\n"}
{"name": "mbpp_242_count_charac", "language": "py", "prompt": "def count_charac(str1: str) -> int:\n \"\"\"\n\tWrite a function to count the total number of characters in a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_242_count_charac.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_charac", "test": "def check(candidate):\n assert candidate('python programming') == 18\n assert candidate('language') == 8\n assert candidate('words') == 5\n\ndef test_check():\n check(count_charac)\n\ntest_check()\n"}
{"name": "mbpp_616_tuple_modulo", "language": "py", "prompt": "from typing import Tuple\n\ndef tuple_modulo(test_tup1: Tuple[int, int, int, int], test_tup2: Tuple[int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function which takes two tuples of the same length and performs the element wise modulo.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_616_tuple_modulo.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tuple_modulo", "test": "def check(candidate):\n assert candidate((10, 4, 5, 6), (5, 6, 7, 5)) == (0, 4, 5, 1)\n assert candidate((11, 5, 6, 7), (6, 7, 8, 6)) == (5, 5, 6, 1)\n assert candidate((12, 6, 7, 8), (7, 8, 9, 7)) == (5, 6, 7, 1)\n\ndef test_check():\n check(tuple_modulo)\n\ntest_check()\n"}
{"name": "mbpp_583_catalan_number", "language": "py", "prompt": "def catalan_number(num: int) -> int:\n \"\"\"\n\tWrite a function which returns nth catalan number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_583_catalan_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "catalan_number", "test": "def check(candidate):\n assert candidate(10) == 16796\n assert candidate(9) == 4862\n assert candidate(7) == 429\n\ndef test_check():\n check(catalan_number)\n\ntest_check()\n"}
{"name": "mbpp_129_magic_square_test", "language": "py", "prompt": "from typing import List\n\ndef magic_square_test(my_matrix: List[List[int]]) -> bool:\n \"\"\"\n\tWrite a function to calculate whether the matrix is a magic square.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_129_magic_square_test.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "magic_square_test", "test": "def check(candidate):\n assert candidate([[7, 12, 1, 14], [2, 13, 8, 11], [16, 3, 10, 5], [9, 6, 15, 4]]) == True\n assert candidate([[2, 7, 6], [9, 5, 1], [4, 3, 8]]) == True\n assert candidate([[2, 7, 6], [9, 5, 1], [4, 3, 7]]) == False\n\ndef test_check():\n check(magic_square_test)\n\ntest_check()\n"}
{"name": "mbpp_61_count_Substrings", "language": "py", "prompt": "def count_Substrings(s: str) -> int:\n \"\"\"\n\tWrite a python function to count the number of substrings with the sum of digits equal to their length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_61_count_Substrings.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_Substrings", "test": "def check(candidate):\n assert candidate('112112') == 6\n assert candidate('111') == 6\n assert candidate('1101112') == 12\n\ndef test_check():\n check(count_Substrings)\n\ntest_check()\n"}
{"name": "mbpp_287_square_Sum", "language": "py", "prompt": "def square_Sum(n: int) -> int:\n \"\"\"\n\tWrite a python function takes in an integer n and returns the sum of squares of first n even natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_287_square_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "square_Sum", "test": "def check(candidate):\n assert candidate(2) == 20\n assert candidate(3) == 56\n assert candidate(4) == 120\n\ndef test_check():\n check(square_Sum)\n\ntest_check()\n"}
{"name": "mbpp_93_power", "language": "py", "prompt": "def power(a: int, b: int) -> int:\n \"\"\"\n\tWrite a function to calculate the value of 'a' to the power 'b'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_93_power.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "power", "test": "def check(candidate):\n assert candidate(3, 4) == 81\n assert candidate(2, 3) == 8\n assert candidate(5, 5) == 3125\n\ndef test_check():\n check(power)\n\ntest_check()\n"}
{"name": "mbpp_607_find_literals", "language": "py", "prompt": "from typing import Tuple\n\ndef find_literals(text: str, pattern: str) -> Tuple[str, int, int]:\n \"\"\"\n\tWrite a function to search a string for a regex pattern. The function should return the matching subtring, a start index and an end index.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_607_find_literals.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_literals", "test": "def check(candidate):\n assert candidate('The quick brown fox jumps over the lazy dog.', 'fox') == ('fox', 16, 19)\n assert candidate('Its been a very crazy procedure right', 'crazy') == ('crazy', 16, 21)\n assert candidate('Hardest choices required strongest will', 'will') == ('will', 35, 39)\n\ndef test_check():\n check(find_literals)\n\ntest_check()\n"}
{"name": "mbpp_94_index_minimum", "language": "py", "prompt": "from typing import List, Tuple\n\ndef index_minimum(test_list: List[Tuple[str, int]]) -> str:\n \"\"\"\n\tGiven a list of tuples, write a function that returns the first value of the tuple with the smallest second value.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_94_index_minimum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "index_minimum", "test": "def check(candidate):\n assert candidate([('Rash', 143), ('Manjeet', 200), ('Varsha', 100)]) == 'Varsha'\n assert candidate([('Yash', 185), ('Dawood', 125), ('Sanya', 175)]) == 'Dawood'\n assert candidate([('Sai', 345), ('Salman', 145), ('Ayesha', 96)]) == 'Ayesha'\n\ndef test_check():\n check(index_minimum)\n\ntest_check()\n"}
{"name": "mbpp_138_is_Sum_Of_Powers_Of_Two", "language": "py", "prompt": "def is_Sum_Of_Powers_Of_Two(n: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_138_is_Sum_Of_Powers_Of_Two.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_Sum_Of_Powers_Of_Two", "test": "def check(candidate):\n assert candidate(10) == True\n assert candidate(7) == False\n assert candidate(14) == True\n\ndef test_check():\n check(is_Sum_Of_Powers_Of_Two)\n\ntest_check()\n"}
{"name": "mbpp_594_diff_even_odd", "language": "py", "prompt": "from typing import List\n\ndef diff_even_odd(list1: List[int]) -> int:\n \"\"\"\n\tWrite a function to find the difference of the first even and first odd number of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_594_diff_even_odd.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "diff_even_odd", "test": "def check(candidate):\n assert candidate([1, 3, 5, 7, 4, 1, 6, 8]) == 3\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate([1, 5, 7, 9, 10]) == 9\n\ndef test_check():\n check(diff_even_odd)\n\ntest_check()\n"}
{"name": "mbpp_274_even_binomial_Coeff_Sum", "language": "py", "prompt": "def even_binomial_Coeff_Sum(n: int) -> int:\n \"\"\"\n\tWrite a python function that takes in a positive integer n and finds the sum of even index binomial coefficients.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_274_even_binomial_Coeff_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "even_binomial_Coeff_Sum", "test": "def check(candidate):\n assert candidate(4) == 8\n assert candidate(6) == 32\n assert candidate(2) == 2\n\ndef test_check():\n check(even_binomial_Coeff_Sum)\n\ntest_check()\n"}
{"name": "mbpp_126_sum", "language": "py", "prompt": "def sum(a: int, b: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of common divisors of two given numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_126_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum", "test": "def check(candidate):\n assert candidate(10, 15) == 6\n assert candidate(100, 150) == 93\n assert candidate(4, 6) == 3\n\ndef test_check():\n check(sum)\n\ntest_check()\n"}
{"name": "mbpp_769_Diff", "language": "py", "prompt": "from typing import List\n\ndef Diff(li1: List[int], li2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to get the difference between two lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_769_Diff.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Diff", "test": "def check(candidate):\n assert candidate([10, 15, 20, 25, 30, 35, 40], [25, 40, 35]) == [10, 20, 30, 15]\n assert candidate([1, 2, 3, 4, 5], [6, 7, 1]) == [2, 3, 4, 5, 6, 7]\n assert candidate([1, 2, 3], [6, 7, 1]) == [2, 3, 6, 7]\n\ndef test_check():\n check(Diff)\n\ntest_check()\n"}
{"name": "mbpp_796_return_sum", "language": "py", "prompt": "from typing import Dict\n\ndef return_sum(dict: Dict[str, int]) -> int:\n \"\"\"\n\tWrite function to find the sum of all items in the given dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_796_return_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "return_sum", "test": "def check(candidate):\n assert candidate({ 'a': 100, 'b': 200, 'c': 300 }) == 600\n assert candidate({ 'a': 25, 'b': 18, 'c': 45 }) == 88\n assert candidate({ 'a': 36, 'b': 39, 'c': 49 }) == 124\n\ndef test_check():\n check(return_sum)\n\ntest_check()\n"}
{"name": "mbpp_574_surfacearea_cylinder", "language": "py", "prompt": "def surfacearea_cylinder(r: int, h: int) -> float:\n \"\"\"\n\tWrite a function to find the surface area of a cylinder.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_574_surfacearea_cylinder.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "surfacearea_cylinder", "test": "def check(candidate):\n assert candidate(10, 5) == 942.45\n assert candidate(4, 5) == 226.18800000000002\n assert candidate(4, 10) == 351.848\n\ndef test_check():\n check(surfacearea_cylinder)\n\ntest_check()\n"}
{"name": "mbpp_783_rgb_to_hsv", "language": "py", "prompt": "from typing import List\n\ndef rgb_to_hsv(r: int, g: int, b: int) -> List[float]:\n \"\"\"\n\tWrite a function to convert rgb color to hsv color. https://www.geeksforgeeks.org/program-change-rgb-color-model-hsv-color-model/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_783_rgb_to_hsv.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "rgb_to_hsv", "test": "def check(candidate):\n assert candidate(255, 255, 255) == [0.0, 0.0, 100.0]\n assert candidate(0, 215, 0) == [120.0, 100.0, 84.31372549019608]\n assert candidate(10, 215, 110) == [149.26829268292684, 95.34883720930233, 84.31372549019608]\n\ndef test_check():\n check(rgb_to_hsv)\n\ntest_check()\n"}
{"name": "mbpp_70_get_equal", "language": "py", "prompt": "from typing import List\n\ndef get_equal(Input: List[List[int]]) -> bool:\n \"\"\"\n\tWrite a function to find whether all the given lists have equal length or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_70_get_equal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_equal", "test": "def check(candidate):\n assert candidate([[11, 22, 33], [44, 55, 66]]) == True\n assert candidate([[1, 2, 3], [4, 5, 6, 7]]) == False\n assert candidate([[1, 2], [3, 4]]) == True\n\ndef test_check():\n check(get_equal)\n\ntest_check()\n"}
{"name": "mbpp_267_square_Sum", "language": "py", "prompt": "def square_Sum(n: int) -> int:\n \"\"\"\n\tWrite a python function that takes in an integer n and returns the sum of the squares of the first n odd natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_267_square_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "square_Sum", "test": "def check(candidate):\n assert candidate(2) == 10\n assert candidate(3) == 35\n assert candidate(4) == 84\n\ndef test_check():\n check(square_Sum)\n\ntest_check()\n"}
{"name": "mbpp_171_perimeter_pentagon", "language": "py", "prompt": "def perimeter_pentagon(a: int) -> int:\n \"\"\"\n\tWrite a function to find the perimeter of a regular pentagon from the length of its sides.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_171_perimeter_pentagon.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "perimeter_pentagon", "test": "def check(candidate):\n assert candidate(5) == 25\n assert candidate(10) == 50\n assert candidate(15) == 75\n\ndef test_check():\n check(perimeter_pentagon)\n\ntest_check()\n"}
{"name": "mbpp_222_check_type", "language": "py", "prompt": "from typing import Any\n\ndef check_type(test_tuple: Any) -> bool:\n \"\"\"\n\tWrite a function to check if all the elements in tuple have same data type or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_222_check_type.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_type", "test": "def check(candidate):\n assert candidate((5, 6, 7, 3, 5, 6)) == True\n assert candidate((1, 2, '4')) == False\n assert candidate((3, 2, 1, 4, 5)) == True\n\ndef test_check():\n check(check_type)\n\ntest_check()\n"}
{"name": "mbpp_164_are_equivalent", "language": "py", "prompt": "def are_equivalent(num1: int, num2: int) -> bool:\n \"\"\"\n\tWrite a function to determine if the sum of the divisors of two integers are the same.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_164_are_equivalent.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "are_equivalent", "test": "def check(candidate):\n assert candidate(36, 57) == False\n assert candidate(2, 4) == False\n assert candidate(23, 47) == True\n\ndef test_check():\n check(are_equivalent)\n\ntest_check()\n"}
{"name": "mbpp_803_is_perfect_square", "language": "py", "prompt": "def is_perfect_square(n: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given number is a perfect square or not. https://www.geeksforgeeks.org/check-if-given-number-is-perfect-square-in-cpp/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_803_is_perfect_square.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_perfect_square", "test": "def check(candidate):\n assert candidate(10) == False\n assert candidate(36) == True\n assert candidate(14) == False\n assert candidate(196) == True\n assert candidate(125) == False\n assert candidate(15625) == True\n\ndef test_check():\n check(is_perfect_square)\n\ntest_check()\n"}
{"name": "mbpp_305_start_withp", "language": "py", "prompt": "from typing import List, Tuple\n\ndef start_withp(words: List[str]) -> Tuple[str, str]:\n \"\"\"\n\tWrite a function to return two words from a list of words starting with letter 'p'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_305_start_withp.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "start_withp", "test": "def check(candidate):\n assert candidate(['Python PHP', 'Java JavaScript', 'c c++']) == ('Python', 'PHP')\n assert candidate(['Python Programming', 'Java Programming']) == ('Python', 'Programming')\n assert candidate(['Pqrst Pqr', 'qrstuv']) == ('Pqrst', 'Pqr')\n\ndef test_check():\n check(start_withp)\n\ntest_check()\n"}
{"name": "mbpp_617_min_Jumps", "language": "py", "prompt": "from typing import Tuple\n\ndef min_Jumps(steps: Tuple[int, int], d: int) -> float:\n \"\"\"\n\tWrite a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_617_min_Jumps.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_Jumps", "test": "def check(candidate):\n assert candidate((3, 4), 11) == 3.5\n assert candidate((3, 4), 0) == 0\n assert candidate((11, 14), 11) == 1\n\ndef test_check():\n check(min_Jumps)\n\ntest_check()\n"}
{"name": "mbpp_117_list_to_float", "language": "py", "prompt": "from typing import List, Tuple\n\ndef list_to_float(test_list: List[Tuple[str, str]]) -> List[Tuple[float, float]]:\n \"\"\"\n\tWrite a function to convert all possible convertible elements in a list of lists to floats.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_117_list_to_float.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "list_to_float", "test": "def check(candidate):\n assert candidate([('3', '4'), ('1', '26.45'), ('7.32', '8'), ('4', '8')]) == [(3.0, 4.0), (1.0, 26.45), (7.32, 8.0), (4.0, 8.0)]\n assert candidate([('4', '4'), ('2', '27'), ('4.12', '9'), ('7', '11')]) == [(4.0, 4.0), (2.0, 27.0), (4.12, 9.0), (7.0, 11.0)]\n assert candidate([('6', '78'), ('5', '26.45'), ('1.33', '4'), ('82', '13')]) == [(6.0, 78.0), (5.0, 26.45), (1.33, 4.0), (82.0, 13.0)]\n\ndef test_check():\n check(list_to_float)\n\ntest_check()\n"}
{"name": "mbpp_425_count_element_in_list", "language": "py", "prompt": "from typing import List, Any\n\ndef count_element_in_list(list1: List[List[Any]], x: Any) -> int:\n \"\"\"\n\tWrite a function to count the number of sublists containing a particular element.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_425_count_element_in_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_element_in_list", "test": "def check(candidate):\n assert candidate([[1, 3], [5, 7], [1, 11], [1, 15, 7]], 1) == 3\n assert candidate([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']], 'A') == 3\n assert candidate([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']], 'E') == 1\n\ndef test_check():\n check(count_element_in_list)\n\ntest_check()\n"}
{"name": "mbpp_67_bell_number", "language": "py", "prompt": "def bell_number(n: int) -> int:\n \"\"\"\n\tWrite a function to find the number of ways to partition a set of Bell numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_67_bell_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "bell_number", "test": "def check(candidate):\n assert candidate(2) == 2\n assert candidate(10) == 115975\n assert candidate(56) == 6775685320645824322581483068371419745979053216268760300\n\ndef test_check():\n check(bell_number)\n\ntest_check()\n"}
{"name": "mbpp_404_minimum", "language": "py", "prompt": "def minimum(a: int, b: int) -> int:\n \"\"\"\n\tWrite a python function to find the minimum of two numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_404_minimum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "minimum", "test": "def check(candidate):\n assert candidate(1, 2) == 1\n assert candidate(-5, -4) == -5\n assert candidate(0, 0) == 0\n\ndef test_check():\n check(minimum)\n\ntest_check()\n"}
{"name": "mbpp_14_find_Volume", "language": "py", "prompt": "def find_Volume(l: int, b: int, h: int) -> int:\n \"\"\"\n\tWrite a python function to find the volume of a triangular prism.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_14_find_Volume.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Volume", "test": "def check(candidate):\n assert candidate(10, 8, 6) == 240\n assert candidate(3, 2, 2) == 6\n assert candidate(1, 2, 1) == 1\n\ndef test_check():\n check(find_Volume)\n\ntest_check()\n"}
{"name": "mbpp_8_square_nums", "language": "py", "prompt": "from typing import List\n\ndef square_nums(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to find squares of individual elements in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_8_square_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "square_nums", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]\n assert candidate([10, 20, 30]) == [100, 400, 900]\n assert candidate([12, 15]) == [144, 225]\n\ndef test_check():\n check(square_nums)\n\ntest_check()\n"}
{"name": "mbpp_722_filter_data", "language": "py", "prompt": "from typing import Dict, Tuple\n\ndef filter_data(students: Dict[str, Tuple[float, int]], h: float, w: int) -> Dict[str, Tuple[float, int]]:\n \"\"\"\n\tThe input is given as - a dictionary with a student name as a key and a tuple of float (student_height, student_weight) as a value, - minimal height, - minimal weight. Write a function to filter students that have height and weight above the minimum.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_722_filter_data.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "filter_data", "test": "def check(candidate):\n assert candidate({ 'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66) }, 6.0, 70) == { 'Cierra Vega': (6.2, 70) }\n assert candidate({ 'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66) }, 5.9, 67) == { 'Cierra Vega': (6.2, 70), 'Kierra Gentry': (6.0, 68) }\n assert candidate({ 'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66) }, 5.7, 64) == { 'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66) }\n\ndef test_check():\n check(filter_data)\n\ntest_check()\n"}
{"name": "mbpp_244_next_Perfect_Square", "language": "py", "prompt": "def next_Perfect_Square(N: int) -> int:\n \"\"\"\n\tWrite a python function to find the next perfect square greater than a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_244_next_Perfect_Square.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "next_Perfect_Square", "test": "def check(candidate):\n assert candidate(35) == 36\n assert candidate(6) == 9\n assert candidate(9) == 16\n\ndef test_check():\n check(next_Perfect_Square)\n\ntest_check()\n"}
{"name": "mbpp_755_second_smallest", "language": "py", "prompt": "from typing import List, Union, Optional\n\ndef second_smallest(numbers: List[Union[int, float]]) -> Optional[float]:\n \"\"\"\n\tWrite a function to find the second smallest number in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_755_second_smallest.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "second_smallest", "test": "def check(candidate):\n assert candidate([1, 2, -8, -2, 0, -2]) == -2\n assert candidate([1, 1, -0.5, 0, 2, -2, -2]) == -0.5\n assert candidate([2, 2]) == None\n assert candidate([2, 2, 2]) == None\n\ndef test_check():\n check(second_smallest)\n\ntest_check()\n"}
{"name": "mbpp_405_check_tuplex", "language": "py", "prompt": "from typing import List, Union, Any\n\ndef check_tuplex(tuplex: List[Union[str, int]], tuple1: Any) -> bool:\n \"\"\"\n\tWrite a function to check whether an element exists within a tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_405_check_tuplex.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_tuplex", "test": "def check(candidate):\n assert candidate(['w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'], 'r') == True\n assert candidate(['w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'], '5') == False\n assert candidate(['w', 3, 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e'], 3) == True\n\ndef test_check():\n check(check_tuplex)\n\ntest_check()\n"}
{"name": "mbpp_292_find", "language": "py", "prompt": "def find(n: int, m: int) -> int:\n \"\"\"\n\tWrite a python function to find quotient of two numbers (rounded down to the nearest integer).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_292_find.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find", "test": "def check(candidate):\n assert candidate(10, 3) == 3\n assert candidate(4, 2) == 2\n assert candidate(20, 5) == 4\n\ndef test_check():\n check(find)\n\ntest_check()\n"}
{"name": "mbpp_603_get_ludic", "language": "py", "prompt": "from typing import List\n\ndef get_ludic(n: int) -> List[int]:\n \"\"\"\n\tWrite a function to get all lucid numbers smaller than or equal to a given integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_603_get_ludic.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_ludic", "test": "def check(candidate):\n assert candidate(10) == [1, 2, 3, 5, 7]\n assert candidate(25) == [1, 2, 3, 5, 7, 11, 13, 17, 23, 25]\n assert candidate(45) == [1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43]\n\ndef test_check():\n check(get_ludic)\n\ntest_check()\n"}
{"name": "mbpp_734_sum_Of_Subarray_Prod", "language": "py", "prompt": "from typing import List\n\ndef sum_Of_Subarray_Prod(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find sum of products of all possible sublists of a given list. https://www.geeksforgeeks.org/sum-of-products-of-all-possible-subarrays/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_734_sum_Of_Subarray_Prod.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_Of_Subarray_Prod", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == 20\n assert candidate([1, 2]) == 5\n assert candidate([1, 2, 3, 4]) == 84\n\ndef test_check():\n check(sum_Of_Subarray_Prod)\n\ntest_check()\n"}
{"name": "mbpp_563_extract_values", "language": "py", "prompt": "from typing import List\n\ndef extract_values(text: str) -> List[str]:\n \"\"\"\n\tWrite a function to extract values between quotation marks from a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_563_extract_values.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_values", "test": "def check(candidate):\n assert candidate('\"Python\", \"PHP\", \"Java\"') == ['Python', 'PHP', 'Java']\n assert candidate('\"python\",\"program\",\"language\"') == ['python', 'program', 'language']\n assert candidate('\"red\",\"blue\",\"green\",\"yellow\"') == ['red', 'blue', 'green', 'yellow']\n\ndef test_check():\n check(extract_values)\n\ntest_check()\n"}
{"name": "mbpp_567_issort_list", "language": "py", "prompt": "from typing import List\n\ndef issort_list(list1: List[int]) -> bool:\n \"\"\"\n\tWrite a function to check whether a specified list is sorted or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_567_issort_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "issort_list", "test": "def check(candidate):\n assert candidate([1, 2, 4, 6, 8, 10, 12, 14, 16, 17]) == True\n assert candidate([1, 2, 4, 6, 8, 10, 12, 14, 20, 17]) == False\n assert candidate([1, 2, 4, 6, 8, 10, 15, 14, 20]) == False\n\ndef test_check():\n check(issort_list)\n\ntest_check()\n"}
{"name": "mbpp_475_sort_counter", "language": "py", "prompt": "from typing import Dict, List, Tuple\n\ndef sort_counter(dict1: Dict[str, int]) -> List[Tuple[str, int]]:\n \"\"\"\n\tWrite a function to sort a dictionary by value.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_475_sort_counter.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sort_counter", "test": "def check(candidate):\n assert candidate({ 'Math': 81, 'Physics': 83, 'Chemistry': 87 }) == [('Chemistry', 87), ('Physics', 83), ('Math', 81)]\n assert candidate({ 'Math': 400, 'Physics': 300, 'Chemistry': 250 }) == [('Math', 400), ('Physics', 300), ('Chemistry', 250)]\n assert candidate({ 'Math': 900, 'Physics': 1000, 'Chemistry': 1250 }) == [('Chemistry', 1250), ('Physics', 1000), ('Math', 900)]\n\ndef test_check():\n check(sort_counter)\n\ntest_check()\n"}
{"name": "mbpp_65_recursive_list_sum", "language": "py", "prompt": "from typing import List, Union\n\ndef recursive_list_sum(data_list: List[Union[int, List[int]]]) -> int:\n \"\"\"\n\tWrite a function to flatten a list and sum all of its elements.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_65_recursive_list_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "recursive_list_sum", "test": "def check(candidate):\n assert candidate([1, 2, [3, 4], [5, 6]]) == 21\n assert candidate([7, 10, [15, 14], [19, 41]]) == 106\n assert candidate([10, 20, [30, 40], [50, 60]]) == 210\n\ndef test_check():\n check(recursive_list_sum)\n\ntest_check()\n"}
{"name": "mbpp_560_union_elements", "language": "py", "prompt": "from typing import List\n\ndef union_elements(test_tup1: List[int], test_tup2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to find the union of the elements of two given lists and output them in sorted order.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_560_union_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "union_elements", "test": "def check(candidate):\n assert candidate([3, 4, 5, 6], [5, 7, 4, 10]) == [3, 4, 5, 6, 7, 10]\n assert candidate([1, 2, 3, 4], [3, 4, 5, 6]) == [1, 2, 3, 4, 5, 6]\n assert candidate([11, 12, 13, 14], [13, 15, 16, 17]) == [11, 12, 13, 14, 15, 16, 17]\n\ndef test_check():\n check(union_elements)\n\ntest_check()\n"}
{"name": "mbpp_737_check_str", "language": "py", "prompt": "def check_str(string: str) -> bool:\n \"\"\"\n\tWrite a function to check whether the given string is starting with a vowel or not using regex.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_737_check_str.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_str", "test": "def check(candidate):\n assert candidate('annie') == True\n assert candidate('dawood') == False\n assert candidate('Else') == True\n\ndef test_check():\n check(check_str)\n\ntest_check()\n"}
{"name": "mbpp_626_triangle_area", "language": "py", "prompt": "from typing import Optional\n\ndef triangle_area(r: int) -> Optional[int]:\n \"\"\"\n\tWrite a python function to find the area of the largest triangle that can be inscribed in a semicircle with a given radius.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_626_triangle_area.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "triangle_area", "test": "def check(candidate):\n assert candidate(-1) == None\n assert candidate(0) == 0\n assert candidate(2) == 4\n\ndef test_check():\n check(triangle_area)\n\ntest_check()\n"}
{"name": "mbpp_253_count_integer", "language": "py", "prompt": "from typing import List, Union\n\ndef count_integer(list1: List[Union[int, str, float]]) -> int:\n \"\"\"\n\tWrite a python function that returns the number of integer elements in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_253_count_integer.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_integer", "test": "def check(candidate):\n assert candidate([1, 2, 'abc', 1.2]) == 2\n assert candidate([1, 2, 3]) == 3\n assert candidate([1, 1.2, 4, 5.1]) == 2\n\ndef test_check():\n check(count_integer)\n\ntest_check()\n"}
{"name": "mbpp_463_max_subarray_product", "language": "py", "prompt": "from typing import List\n\ndef max_subarray_product(arr: List[int]) -> int:\n \"\"\"\n\tWrite a function to find the maximum product subarray of the given array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_463_max_subarray_product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_subarray_product", "test": "def check(candidate):\n assert candidate([1, -2, -3, 0, 7, -8, -2]) == 112\n assert candidate([6, -3, -10, 0, 2]) == 180\n assert candidate([-2, -40, 0, -2, -3]) == 80\n\ndef test_check():\n check(max_subarray_product)\n\ntest_check()\n"}
{"name": "mbpp_223_is_majority", "language": "py", "prompt": "from typing import List\n\ndef is_majority(arr: List[int], n: int, x: int) -> bool:\n \"\"\"\n\tWrite a function that takes in a sorted array, its length (n), and an element and returns whether the element is the majority element in the given sorted array. (The majority element is the element that occurs more than n/2 times.)\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_223_is_majority.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_majority", "test": "def check(candidate):\n assert candidate([1, 2, 3, 3, 3, 3, 10], 7, 3) == True\n assert candidate([1, 1, 2, 4, 4, 4, 6, 6], 8, 4) == False\n assert candidate([1, 1, 1, 2, 2], 5, 1) == True\n assert candidate([1, 1, 2, 2], 5, 1) == False\n\ndef test_check():\n check(is_majority)\n\ntest_check()\n"}
{"name": "mbpp_794_text_starta_endb", "language": "py", "prompt": "def text_starta_endb(text: str) -> bool:\n \"\"\"\n\tWrite a function that matches a string that has an 'a' followed by anything, ending in 'b'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_794_text_starta_endb.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_starta_endb", "test": "def check(candidate):\n assert candidate('aabbbb') == True\n assert candidate('aabAbbbc') == False\n assert candidate('accddbbjjj') == False\n\ndef test_check():\n check(text_starta_endb)\n\ntest_check()\n"}
{"name": "mbpp_79_word_len", "language": "py", "prompt": "def word_len(s: str) -> bool:\n \"\"\"\n\tWrite a python function to check whether the length of the word is odd or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_79_word_len.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "word_len", "test": "def check(candidate):\n assert candidate('Hadoop') == False\n assert candidate('great') == True\n assert candidate('structure') == True\n\ndef test_check():\n check(word_len)\n\ntest_check()\n"}
{"name": "mbpp_390_add_string", "language": "py", "prompt": "from typing import List, Any\n\ndef add_string(list_: List[Any], string: str) -> List[str]:\n \"\"\"\n\tWrite a function to apply a given format string to all of the elements in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_390_add_string.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_string", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4], 'temp{0}') == ['temp1', 'temp2', 'temp3', 'temp4']\n assert candidate(['a', 'b', 'c', 'd'], 'python{0}') == ['pythona', 'pythonb', 'pythonc', 'pythond']\n assert candidate([5, 6, 7, 8], 'string{0}') == ['string5', 'string6', 'string7', 'string8']\n\ndef test_check():\n check(add_string)\n\ntest_check()\n"}
{"name": "mbpp_741_all_Characters_Same", "language": "py", "prompt": "def all_Characters_Same(s: str) -> bool:\n \"\"\"\n\tWrite a python function to check whether all the characters are same or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_741_all_Characters_Same.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "all_Characters_Same", "test": "def check(candidate):\n assert candidate('python') == False\n assert candidate('aaa') == True\n assert candidate('data') == False\n\ndef test_check():\n check(all_Characters_Same)\n\ntest_check()\n"}
{"name": "mbpp_775_odd_position", "language": "py", "prompt": "from typing import List\n\ndef odd_position(nums: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether every odd index contains odd numbers of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_775_odd_position.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "odd_position", "test": "def check(candidate):\n assert candidate([2, 1, 4, 3, 6, 7, 6, 3]) == True\n assert candidate([4, 1, 2]) == True\n assert candidate([1, 2, 3]) == False\n\ndef test_check():\n check(odd_position)\n\ntest_check()\n"}
{"name": "mbpp_644_reverse_Array_Upto_K", "language": "py", "prompt": "from typing import List\n\ndef reverse_Array_Upto_K(input: List[int], k: int) -> List[int]:\n \"\"\"\n\tWrite a python function to reverse an array upto a given position.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_644_reverse_Array_Upto_K.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "reverse_Array_Upto_K", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6], 4) == [4, 3, 2, 1, 5, 6]\n assert candidate([4, 5, 6, 7], 2) == [5, 4, 6, 7]\n assert candidate([9, 8, 7, 6, 5], 3) == [7, 8, 9, 6, 5]\n\ndef test_check():\n check(reverse_Array_Upto_K)\n\ntest_check()\n"}
{"name": "mbpp_588_big_diff", "language": "py", "prompt": "from typing import List\n\ndef big_diff(nums: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the difference between largest and smallest value in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_588_big_diff.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "big_diff", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4]) == 3\n assert candidate([4, 5, 12]) == 8\n assert candidate([9, 2, 3]) == 7\n\ndef test_check():\n check(big_diff)\n\ntest_check()\n"}
{"name": "mbpp_297_flatten_list", "language": "py", "prompt": "from typing import List, Union\n\ndef flatten_list(list1: List[Union[int, List[int]]]) -> List[int]:\n \"\"\"\n\tWrite a function to flatten a given nested list structure.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_297_flatten_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "flatten_list", "test": "def check(candidate):\n assert candidate([0, 10, [20, 30], 40, 50, [60, 70, 80], [90, 100, 110, 120]]) == [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]\n assert candidate([[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]]) == [10, 20, 40, 30, 56, 25, 10, 20, 33, 40]\n assert candidate([[1, 2, 3], [4, 5, 6], [10, 11, 12], [7, 8, 9]]) == [1, 2, 3, 4, 5, 6, 10, 11, 12, 7, 8, 9]\n\ndef test_check():\n check(flatten_list)\n\ntest_check()\n"}
{"name": "mbpp_445_index_multiplication", "language": "py", "prompt": "from typing import List\n\ndef index_multiplication(test_tup1: List[List[int]], test_tup2: List[List[int]]) -> List[List[int]]:\n \"\"\"\n\tWrite a function to perform index wise multiplication of list elements in the given two lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_445_index_multiplication.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "index_multiplication", "test": "def check(candidate):\n assert candidate([[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]) == [[6, 21], [12, 45], [2, 9], [7, 30]]\n assert candidate([[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]) == [[14, 32], [20, 60], [6, 20], [16, 44]]\n assert candidate([[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]) == [[24, 45], [30, 77], [12, 33], [27, 60]]\n\ndef test_check():\n check(index_multiplication)\n\ntest_check()\n"}
{"name": "mbpp_256_count_Primes_nums", "language": "py", "prompt": "def count_Primes_nums(n: int) -> int:\n \"\"\"\n\tWrite a python function that takes in a non-negative number and returns the number of prime numbers less than the given non-negative number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_256_count_Primes_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_Primes_nums", "test": "def check(candidate):\n assert candidate(5) == 2\n assert candidate(10) == 4\n assert candidate(100) == 25\n\ndef test_check():\n check(count_Primes_nums)\n\ntest_check()\n"}
{"name": "mbpp_170_sum_range_list", "language": "py", "prompt": "from typing import List\n\ndef sum_range_list(list1: List[int], m: int, n: int) -> int:\n \"\"\"\n\tWrite a function to find the sum of numbers in a list within a range specified by two indices.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_170_sum_range_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_range_list", "test": "def check(candidate):\n assert candidate([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 8, 10) == 29\n assert candidate([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 5, 7) == 16\n assert candidate([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 7, 10) == 38\n\ndef test_check():\n check(sum_range_list)\n\ntest_check()\n"}
{"name": "mbpp_71_comb_sort", "language": "py", "prompt": "from typing import List\n\ndef comb_sort(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to sort a list of elements.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_71_comb_sort.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "comb_sort", "test": "def check(candidate):\n assert candidate([5, 15, 37, 25, 79]) == [5, 15, 25, 37, 79]\n assert candidate([41, 32, 15, 19, 22]) == [15, 19, 22, 32, 41]\n assert candidate([99, 15, 13, 47]) == [13, 15, 47, 99]\n\ndef test_check():\n check(comb_sort)\n\ntest_check()\n"}
{"name": "mbpp_451_remove_whitespaces", "language": "py", "prompt": "def remove_whitespaces(text1: str) -> str:\n \"\"\"\n\tWrite a function to remove all whitespaces from the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_451_remove_whitespaces.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_whitespaces", "test": "def check(candidate):\n assert candidate(' Google Flutter ') == 'GoogleFlutter'\n assert candidate(' Google Dart ') == 'GoogleDart'\n assert candidate(' iOS Swift ') == 'iOSSwift'\n\ndef test_check():\n check(remove_whitespaces)\n\ntest_check()\n"}
{"name": "mbpp_747_lcs_of_three", "language": "py", "prompt": "def lcs_of_three(X: str, Y: str, Z: str) -> int:\n \"\"\"\n\tWrite a function to find the longest common subsequence for the given three string sequence. https://www.geeksforgeeks.org/lcs-longest-common-subsequence-three-strings/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_747_lcs_of_three.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "lcs_of_three", "test": "def check(candidate):\n assert candidate('AGGT12', '12TXAYB', '12XBA') == 2\n assert candidate('Reels', 'Reelsfor', 'ReelsforReels') == 5\n assert candidate('abcd1e2', 'bc12ea', 'bd1ea') == 3\n\ndef test_check():\n check(lcs_of_three)\n\ntest_check()\n"}
{"name": "mbpp_257_swap_numbers", "language": "py", "prompt": "from typing import List\n\ndef swap_numbers(a: int, b: int) -> List[int]:\n \"\"\"\n\tWrite a function that takes in two numbers and returns a list with the second number and then the first number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_257_swap_numbers.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "swap_numbers", "test": "def check(candidate):\n assert candidate(10, 20) == [20, 10]\n assert candidate(15, 17) == [17, 15]\n assert candidate(100, 200) == [200, 100]\n\ndef test_check():\n check(swap_numbers)\n\ntest_check()\n"}
{"name": "mbpp_64_subject_marks", "language": "py", "prompt": "from typing import List, Tuple\n\ndef subject_marks(subjectmarks: List[Tuple[str, int]]) -> List[Tuple[str, int]]:\n \"\"\"\n\tWrite a function to sort a list of tuples using the second value of each tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_64_subject_marks.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "subject_marks", "test": "def check(candidate):\n assert candidate([('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)]) == [('Social sciences', 82), ('English', 88), ('Science', 90), ('Maths', 97)]\n assert candidate([('Telugu', 49), ('Hindhi', 54), ('Social', 33)]) == [('Social', 33), ('Telugu', 49), ('Hindhi', 54)]\n assert candidate([('Physics', 96), ('Chemistry', 97), ('Biology', 45)]) == [('Biology', 45), ('Physics', 96), ('Chemistry', 97)]\n\ndef test_check():\n check(subject_marks)\n\ntest_check()\n"}
{"name": "mbpp_116_tuple_to_int", "language": "py", "prompt": "from typing import Tuple\n\ndef tuple_to_int(nums: Tuple[int, int, int]) -> int:\n \"\"\"\n\tWrite a function to convert a given tuple of positive integers into a single integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_116_tuple_to_int.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tuple_to_int", "test": "def check(candidate):\n assert candidate((1, 2, 3)) == 123\n assert candidate((4, 5, 6)) == 456\n assert candidate((5, 6, 7)) == 567\n\ndef test_check():\n check(tuple_to_int)\n\ntest_check()\n"}
{"name": "mbpp_479_first_Digit", "language": "py", "prompt": "def first_Digit(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the first digit of a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_479_first_Digit.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "first_Digit", "test": "def check(candidate):\n assert candidate(123) == 1\n assert candidate(456) == 4\n assert candidate(12) == 1\n\ndef test_check():\n check(first_Digit)\n\ntest_check()\n"}
{"name": "mbpp_118_string_to_list", "language": "py", "prompt": "from typing import List\n\ndef string_to_list(string: str) -> List[str]:\n \"\"\"\n\tWrite a function to convert a string to a list of strings split on the space character.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_118_string_to_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "string_to_list", "test": "def check(candidate):\n assert candidate('python programming') == ['python', 'programming']\n assert candidate('lists tuples strings') == ['lists', 'tuples', 'strings']\n assert candidate('write a program') == ['write', 'a', 'program']\n\ndef test_check():\n check(string_to_list)\n\ntest_check()\n"}
{"name": "mbpp_763_find_min_diff", "language": "py", "prompt": "from typing import List\n\ndef find_min_diff(arr: List[int], n: int) -> int:\n \"\"\"\n\tWrite a python function to find the minimum difference between any two elements in a given array. https://www.geeksforgeeks.org/find-minimum-difference-pair/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_763_find_min_diff.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_min_diff", "test": "def check(candidate):\n assert candidate([1, 5, 3, 19, 18, 25], 6) == 1\n assert candidate([4, 3, 2, 6], 4) == 1\n assert candidate([30, 5, 20, 9], 4) == 4\n\ndef test_check():\n check(find_min_diff)\n\ntest_check()\n"}
{"name": "mbpp_408_k_smallest_pairs", "language": "py", "prompt": "from typing import List\n\ndef k_smallest_pairs(nums1: List[int], nums2: List[int], k: int) -> List[List[int]]:\n \"\"\"\n\tWrite a function to find k number of smallest pairs which consist of one element from the first array and one element from the second array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_408_k_smallest_pairs.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "k_smallest_pairs", "test": "def check(candidate):\n assert candidate([1, 3, 7], [2, 4, 6], 2) == [[1, 2], [1, 4]]\n assert candidate([1, 3, 7], [2, 4, 6], 1) == [[1, 2]]\n assert candidate([1, 3, 7], [2, 4, 6], 7) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [3, 6], [7, 2]]\n\ndef test_check():\n check(k_smallest_pairs)\n\ntest_check()\n"}
{"name": "mbpp_748_capital_words_spaces", "language": "py", "prompt": "def capital_words_spaces(str1: str) -> str:\n \"\"\"\n\tWrite a function to put spaces between words starting with capital letters in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_748_capital_words_spaces.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "capital_words_spaces", "test": "def check(candidate):\n assert candidate('Python') == 'Python'\n assert candidate('PythonProgrammingExamples') == 'Python Programming Examples'\n assert candidate('GetReadyToBeCodingFreak') == 'Get Ready To Be Coding Freak'\n\ndef test_check():\n check(capital_words_spaces)\n\ntest_check()\n"}
{"name": "mbpp_252_convert", "language": "py", "prompt": "from typing import Tuple\n\ndef convert(numbers: int) -> Tuple[float, float]:\n \"\"\"\n\tWrite a python function to convert complex numbers to polar coordinates.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_252_convert.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "convert", "test": "def check(candidate):\n assert candidate(1) == (1.0, 0.0)\n assert candidate(4) == (4.0, 0.0)\n assert candidate(5) == (5.0, 0.0)\n\ndef test_check():\n check(convert)\n\ntest_check()\n"}
{"name": "mbpp_436_neg_nos", "language": "py", "prompt": "from typing import List\n\ndef neg_nos(list1: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to return the negative numbers in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_436_neg_nos.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "neg_nos", "test": "def check(candidate):\n assert candidate([-1, 4, 5, -6]) == [-1, -6]\n assert candidate([-1, -2, 3, 4]) == [-1, -2]\n assert candidate([-7, -6, 8, 9]) == [-7, -6]\n\ndef test_check():\n check(neg_nos)\n\ntest_check()\n"}
{"name": "mbpp_397_median_numbers", "language": "py", "prompt": "def median_numbers(a: int, b: int, c: int) -> float:\n \"\"\"\n\tWrite a function to find the median of three numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_397_median_numbers.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "median_numbers", "test": "def check(candidate):\n assert candidate(25, 55, 65) == 55.0\n assert candidate(20, 10, 30) == 20.0\n assert candidate(15, 45, 75) == 45.0\n\ndef test_check():\n check(median_numbers)\n\ntest_check()\n"}
{"name": "mbpp_462_combinations_list", "language": "py", "prompt": "from typing import List, Union\n\ndef combinations_list(list1: List[str]) -> List[Union[List[None], List[str]]]:\n \"\"\"\n\tWrite a function to find all possible combinations of the elements of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_462_combinations_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "combinations_list", "test": "def check(candidate):\n assert candidate(['orange', 'red', 'green', 'blue']) == [[], ['orange'], ['red'], ['red', 'orange'], ['green'], ['green', 'orange'], ['green', 'red'], ['green', 'red', 'orange'], ['blue'], ['blue', 'orange'], ['blue', 'red'], ['blue', 'red', 'orange'], ['blue', 'green'], ['blue', 'green', 'orange'], ['blue', 'green', 'red'], ['blue', 'green', 'red', 'orange']]\n assert candidate(['red', 'green', 'blue', 'white', 'black', 'orange']) == [[], ['red'], ['green'], ['green', 'red'], ['blue'], ['blue', 'red'], ['blue', 'green'], ['blue', 'green', 'red'], ['white'], ['white', 'red'], ['white', 'green'], ['white', 'green', 'red'], ['white', 'blue'], ['white', 'blue', 'red'], ['white', 'blue', 'green'], ['white', 'blue', 'green', 'red'], ['black'], ['black', 'red'], ['black', 'green'], ['black', 'green', 'red'], ['black', 'blue'], ['black', 'blue', 'red'], ['black', 'blue', 'green'], ['black', 'blue', 'green', 'red'], ['black', 'white'], ['black', 'white', 'red'], ['black', 'white', 'green'], ['black', 'white', 'green', 'red'], ['black', 'white', 'blue'], ['black', 'white', 'blue', 'red'], ['black', 'white', 'blue', 'green'], ['black', 'white', 'blue', 'green', 'red'], ['orange'], ['orange', 'red'], ['orange', 'green'], ['orange', 'green', 'red'], ['orange', 'blue'], ['orange', 'blue', 'red'], ['orange', 'blue', 'green'], ['orange', 'blue', 'green', 'red'], ['orange', 'white'], ['orange', 'white', 'red'], ['orange', 'white', 'green'], ['orange', 'white', 'green', 'red'], ['orange', 'white', 'blue'], ['orange', 'white', 'blue', 'red'], ['orange', 'white', 'blue', 'green'], ['orange', 'white', 'blue', 'green', 'red'], ['orange', 'black'], ['orange', 'black', 'red'], ['orange', 'black', 'green'], ['orange', 'black', 'green', 'red'], ['orange', 'black', 'blue'], ['orange', 'black', 'blue', 'red'], ['orange', 'black', 'blue', 'green'], ['orange', 'black', 'blue', 'green', 'red'], ['orange', 'black', 'white'], ['orange', 'black', 'white', 'red'], ['orange', 'black', 'white', 'green'], ['orange', 'black', 'white', 'green', 'red'], ['orange', 'black', 'white', 'blue'], ['orange', 'black', 'white', 'blue', 'red'], ['orange', 'black', 'white', 'blue', 'green'], ['orange', 'black', 'white', 'blue', 'green', 'red']]\n assert candidate(['red', 'green', 'black', 'orange']) == [[], ['red'], ['green'], ['green', 'red'], ['black'], ['black', 'red'], ['black', 'green'], ['black', 'green', 'red'], ['orange'], ['orange', 'red'], ['orange', 'green'], ['orange', 'green', 'red'], ['orange', 'black'], ['orange', 'black', 'red'], ['orange', 'black', 'green'], ['orange', 'black', 'green', 'red']]\n\ndef test_check():\n check(combinations_list)\n\ntest_check()\n"}
{"name": "mbpp_745_divisible_by_digits", "language": "py", "prompt": "from typing import List\n\ndef divisible_by_digits(startnum: int, endnum: int) -> List[int]:\n \"\"\"\n\tWrite a function to find numbers within a given range from startnum ti endnum where every number is divisible by every digit it contains. https://www.w3resource.com/python-exercises/lambda/python-lambda-exercise-24.php\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_745_divisible_by_digits.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "divisible_by_digits", "test": "def check(candidate):\n assert candidate(1, 22) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22]\n assert candidate(1, 15) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15]\n assert candidate(20, 25) == [22, 24]\n\ndef test_check():\n check(divisible_by_digits)\n\ntest_check()\n"}
{"name": "mbpp_554_Split", "language": "py", "prompt": "from typing import List\n\ndef Split(list: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function which takes a list of integers and only returns the odd ones.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_554_Split.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Split", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6]) == [1, 3, 5]\n assert candidate([10, 11, 12, 13]) == [11, 13]\n assert candidate([7, 8, 9, 1]) == [7, 9, 1]\n\ndef test_check():\n check(Split)\n\ntest_check()\n"}
{"name": "mbpp_128_long_words", "language": "py", "prompt": "from typing import List\n\ndef long_words(n: int, str: str) -> List[str]:\n \"\"\"\n\tWrite a function to find words that are longer than n characters from a given list of words.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_128_long_words.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "long_words", "test": "def check(candidate):\n assert candidate(3, 'python is a programming language') == ['python', 'programming', 'language']\n assert candidate(2, 'writing a program') == ['writing', 'program']\n assert candidate(5, 'sorting list') == ['sorting']\n\ndef test_check():\n check(long_words)\n\ntest_check()\n"}
{"name": "mbpp_69_is_sublist", "language": "py", "prompt": "from typing import List\n\ndef is_sublist(l: List[int], s: List[int]) -> bool:\n \"\"\"\n\tWrite a function to check whether a list contains the given sublist or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_69_is_sublist.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_sublist", "test": "def check(candidate):\n assert candidate([2, 4, 3, 5, 7], [3, 7]) == False\n assert candidate([2, 4, 3, 5, 7], [4, 3]) == True\n assert candidate([2, 4, 3, 5, 7], [1, 6]) == False\n\ndef test_check():\n check(is_sublist)\n\ntest_check()\n"}
{"name": "mbpp_431_common_element", "language": "py", "prompt": "from typing import List, Any, Optional\n\ndef common_element(list1: List[Any], list2: List[Any]) -> Optional[bool]:\n \"\"\"\n\tWrite a function that takes two lists and returns true if they have at least one common element.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_431_common_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "common_element", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5], [5, 6, 7, 8, 9]) == True\n assert candidate([1, 2, 3, 4, 5], [6, 7, 8, 9]) == None\n assert candidate(['a', 'b', 'c'], ['d', 'b', 'e']) == True\n\ndef test_check():\n check(common_element)\n\ntest_check()\n"}
{"name": "mbpp_732_replace_specialchar", "language": "py", "prompt": "def replace_specialchar(text: str) -> str:\n \"\"\"\n\tWrite a function to replace all occurrences of spaces, commas, or dots with a colon.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_732_replace_specialchar.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_specialchar", "test": "def check(candidate):\n assert candidate('Python language, Programming language.') == 'Python:language::Programming:language:'\n assert candidate('a b c,d e f') == 'a:b:c:d:e:f'\n assert candidate('ram reshma,ram rahim') == 'ram:reshma:ram:rahim'\n\ndef test_check():\n check(replace_specialchar)\n\ntest_check()\n"}
{"name": "mbpp_141_pancake_sort", "language": "py", "prompt": "from typing import List\n\ndef pancake_sort(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to sort a list of elements.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_141_pancake_sort.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "pancake_sort", "test": "def check(candidate):\n assert candidate([15, 79, 25, 38, 69]) == [15, 25, 38, 69, 79]\n assert candidate([98, 12, 54, 36, 85]) == [12, 36, 54, 85, 98]\n assert candidate([41, 42, 32, 12, 23]) == [12, 23, 32, 41, 42]\n\ndef test_check():\n check(pancake_sort)\n\ntest_check()\n"}
{"name": "mbpp_308_large_product", "language": "py", "prompt": "from typing import List\n\ndef large_product(nums1: List[int], nums2: List[int], N: int) -> List[int]:\n \"\"\"\n\tWrite a function to find the specified number of largest products from two given lists, selecting one factor from each list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_308_large_product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "large_product", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 3) == [60, 54, 50]\n assert candidate([1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 4) == [60, 54, 50, 48]\n assert candidate([1, 2, 3, 4, 5, 6], [3, 6, 8, 9, 10, 6], 5) == [60, 54, 50, 48, 45]\n\ndef test_check():\n check(large_product)\n\ntest_check()\n"}
{"name": "mbpp_293_otherside_rightangle", "language": "py", "prompt": "def otherside_rightangle(w: int, h: int) -> float:\n \"\"\"\n\tWrite a function to find the third side of a right angled triangle.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_293_otherside_rightangle.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "otherside_rightangle", "test": "def check(candidate):\n assert candidate(7, 8) == 10.63014581273465\n assert candidate(3, 4) == 5\n assert candidate(7, 15) == 16.55294535724685\n\ndef test_check():\n check(otherside_rightangle)\n\ntest_check()\n"}
{"name": "mbpp_106_add_lists", "language": "py", "prompt": "from typing import List, Tuple\n\ndef add_lists(test_list: List[int], test_tup: Tuple[int, int]) -> Tuple[int, int, int, int, int]:\n \"\"\"\n\tWrite a function to append the given list to the given tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_106_add_lists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_lists", "test": "def check(candidate):\n assert candidate([5, 6, 7], (9, 10)) == (9, 10, 5, 6, 7)\n assert candidate([6, 7, 8], (10, 11)) == (10, 11, 6, 7, 8)\n assert candidate([7, 8, 9], (11, 12)) == (11, 12, 7, 8, 9)\n\ndef test_check():\n check(add_lists)\n\ntest_check()\n"}
{"name": "mbpp_720_add_dict_to_tuple", "language": "py", "prompt": "from typing import Tuple, Dict\n\ndef add_dict_to_tuple(test_tup: Tuple[int, int, int], test_dict: Dict[str, int]) -> Tuple[int, int, int, Dict[str, int]]:\n \"\"\"\n\tWrite a function to add a dictionary to the tuple. The output should be a tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_720_add_dict_to_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_dict_to_tuple", "test": "def check(candidate):\n assert candidate((4, 5, 6), { 'MSAM': 1, 'is': 2, 'best': 3 }) == (4, 5, 6, { 'MSAM': 1, 'is': 2, 'best': 3 })\n assert candidate((1, 2, 3), { 'UTS': 2, 'is': 3, 'Worst': 4 }) == (1, 2, 3, { 'UTS': 2, 'is': 3, 'Worst': 4 })\n assert candidate((8, 9, 10), { 'POS': 3, 'is': 4, 'Okay': 5 }) == (8, 9, 10, { 'POS': 3, 'is': 4, 'Okay': 5 })\n\ndef test_check():\n check(add_dict_to_tuple)\n\ntest_check()\n"}
{"name": "mbpp_395_first_non_repeating_character", "language": "py", "prompt": "from typing import Optional\n\ndef first_non_repeating_character(str1: str) -> Optional[str]:\n \"\"\"\n\tWrite a python function to find the first non-repeated character in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_395_first_non_repeating_character.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "first_non_repeating_character", "test": "def check(candidate):\n assert candidate('abcabc') == None\n assert candidate('abc') == 'a'\n assert candidate('ababc') == 'c'\n\ndef test_check():\n check(first_non_repeating_character)\n\ntest_check()\n"}
{"name": "mbpp_457_Find_Min", "language": "py", "prompt": "from typing import List, Any\n\ndef Find_Min(lst: List[List[Any]]) -> List[Any]:\n \"\"\"\n\tWrite a python function to find the sublist having minimum length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_457_Find_Min.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Find_Min", "test": "def check(candidate):\n assert candidate([[1], [1, 2], [1, 2, 3]]) == [1]\n assert candidate([[1, 1], [1, 1, 1], [1, 2, 7, 8]]) == [1, 1]\n assert candidate([['x'], ['x', 'y'], ['x', 'y', 'z']]) == ['x']\n\ndef test_check():\n check(Find_Min)\n\ntest_check()\n"}
{"name": "mbpp_725_extract_quotation", "language": "py", "prompt": "from typing import List, Any\n\ndef extract_quotation(text1: str) -> List[Any]:\n \"\"\"\n\tWrite a function to extract values between quotation marks \" \" of the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_725_extract_quotation.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_quotation", "test": "def check(candidate):\n assert candidate('Cortex \"A53\" Based \"multi\" tasking \"Processor\"') == ['A53', 'multi', 'Processor']\n assert candidate('Cast your \"favorite\" entertainment \"apps\"') == ['favorite', 'apps']\n assert candidate('Watch content \"4k Ultra HD\" resolution with \"HDR 10\" Support') == ['4k Ultra HD', 'HDR 10']\n assert candidate(\"Watch content '4k Ultra HD' resolution with 'HDR 10' Support\") == []\n\ndef test_check():\n check(extract_quotation)\n\ntest_check()\n"}
{"name": "mbpp_9_find_Rotations", "language": "py", "prompt": "def find_Rotations(str: str) -> int:\n \"\"\"\n\tWrite a python function to find the minimum number of rotations (greater than 0) required to get the same string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_9_find_Rotations.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Rotations", "test": "def check(candidate):\n assert candidate('aaaa') == 1\n assert candidate('ab') == 2\n assert candidate('abc') == 3\n\ndef test_check():\n check(find_Rotations)\n\ntest_check()\n"}
{"name": "mbpp_792_count_list", "language": "py", "prompt": "from typing import List\n\ndef count_list(input_list: List[List[int]]) -> int:\n \"\"\"\n\tWrite a python function to count the number of lists in a given number of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_792_count_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_list", "test": "def check(candidate):\n assert candidate([[1, 3], [5, 7], [9, 11], [13, 15, 17]]) == 4\n assert candidate([[1, 2], [2, 3], [4, 5]]) == 3\n assert candidate([[1, 0], [2, 0]]) == 2\n\ndef test_check():\n check(count_list)\n\ntest_check()\n"}
{"name": "mbpp_477_is_lower", "language": "py", "prompt": "def is_lower(string: str) -> str:\n \"\"\"\n\tWrite a python function to convert the given string to lower case.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_477_is_lower.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_lower", "test": "def check(candidate):\n assert candidate('InValid') == 'invalid'\n assert candidate('TruE') == 'true'\n assert candidate('SenTenCE') == 'sentence'\n\ndef test_check():\n check(is_lower)\n\ntest_check()\n"}
{"name": "mbpp_422_find_Average_Of_Cube", "language": "py", "prompt": "def find_Average_Of_Cube(n: int) -> float:\n \"\"\"\n\tWrite a python function to find the average of cubes of first n natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_422_find_Average_Of_Cube.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Average_Of_Cube", "test": "def check(candidate):\n assert candidate(2) == 4.5\n assert candidate(3) == 12\n assert candidate(1) == 1\n\ndef test_check():\n check(find_Average_Of_Cube)\n\ntest_check()\n"}
{"name": "mbpp_637_noprofit_noloss", "language": "py", "prompt": "def noprofit_noloss(actual_cost: int, sale_amount: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given amount has no profit and no loss\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_637_noprofit_noloss.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "noprofit_noloss", "test": "def check(candidate):\n assert candidate(1500, 1200) == False\n assert candidate(100, 100) == True\n assert candidate(2000, 5000) == False\n\ndef test_check():\n check(noprofit_noloss)\n\ntest_check()\n"}
{"name": "mbpp_557_toggle_string", "language": "py", "prompt": "def toggle_string(string: str) -> str:\n \"\"\"\n\tWrite a function to toggle the case of all characters in a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_557_toggle_string.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "toggle_string", "test": "def check(candidate):\n assert candidate('Python') == 'pYTHON'\n assert candidate('Pangram') == 'pANGRAM'\n assert candidate('LIttLE') == 'liTTle'\n\ndef test_check():\n check(toggle_string)\n\ntest_check()\n"}
{"name": "mbpp_786_right_insertion", "language": "py", "prompt": "from typing import List\n\ndef right_insertion(a: List[int], x: int) -> int:\n \"\"\"\n\tWrite a function to locate the right insertion point for a specified value in sorted order.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_786_right_insertion.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "right_insertion", "test": "def check(candidate):\n assert candidate([1, 2, 4, 5], 6) == 4\n assert candidate([1, 2, 4, 5], 3) == 2\n assert candidate([1, 2, 4, 5], 7) == 4\n\ndef test_check():\n check(right_insertion)\n\ntest_check()\n"}
{"name": "mbpp_807_first_odd", "language": "py", "prompt": "from typing import List\n\ndef first_odd(nums: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the first odd number in a given list of numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_807_first_odd.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "first_odd", "test": "def check(candidate):\n assert candidate([1, 3, 5]) == 1\n assert candidate([2, 4, 1, 3]) == 1\n assert candidate([8, 9, 1]) == 9\n\ndef test_check():\n check(first_odd)\n\ntest_check()\n"}
{"name": "mbpp_631_replace_spaces", "language": "py", "prompt": "def replace_spaces(text: str) -> str:\n \"\"\"\n\tWrite a function to replace whitespaces with an underscore and vice versa in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_631_replace_spaces.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_spaces", "test": "def check(candidate):\n assert candidate('Jumanji The Jungle') == 'Jumanji_The_Jungle'\n assert candidate('The_Avengers') == 'The Avengers'\n assert candidate('Fast and Furious') == 'Fast_and_Furious'\n\ndef test_check():\n check(replace_spaces)\n\ntest_check()\n"}
{"name": "mbpp_573_unique_product", "language": "py", "prompt": "from typing import List\n\ndef unique_product(list_data: List[int]) -> int:\n \"\"\"\n\tWrite a python function to calculate the product of the unique numbers in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_573_unique_product.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "unique_product", "test": "def check(candidate):\n assert candidate([10, 20, 30, 40, 20, 50, 60, 40]) == 720000000\n assert candidate([1, 2, 3, 1]) == 6\n assert candidate([7, 8, 9, 0, 1, 1]) == 0\n\ndef test_check():\n check(unique_product)\n\ntest_check()\n"}
{"name": "mbpp_643_text_match_wordz_middle", "language": "py", "prompt": "def text_match_wordz_middle(text: str) -> bool:\n \"\"\"\n\tWrite a function that checks if a strings contains 'z', except at the start and end of the word.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_643_text_match_wordz_middle.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_wordz_middle", "test": "def check(candidate):\n assert candidate('pythonzabc.') == True\n assert candidate('zxyabc.') == False\n assert candidate(' lang .') == False\n\ndef test_check():\n check(text_match_wordz_middle)\n\ntest_check()\n"}
{"name": "mbpp_299_max_aggregate", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_aggregate(stdata: List[Tuple[str, int]]) -> Tuple[str, int]:\n \"\"\"\n\tWrite a function to calculate the maximum aggregate from the list of tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_299_max_aggregate.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_aggregate", "test": "def check(candidate):\n assert candidate([('Juan Whelan', 90), ('Sabah Colley', 88), ('Peter Nichols', 7), ('Juan Whelan', 122), ('Sabah Colley', 84)]) == ('Juan Whelan', 212)\n assert candidate([('Juan Whelan', 50), ('Sabah Colley', 48), ('Peter Nichols', 37), ('Juan Whelan', 22), ('Sabah Colley', 14)]) == ('Juan Whelan', 72)\n assert candidate([('Juan Whelan', 10), ('Sabah Colley', 20), ('Peter Nichols', 30), ('Juan Whelan', 40), ('Sabah Colley', 50)]) == ('Sabah Colley', 70)\n\ndef test_check():\n check(max_aggregate)\n\ntest_check()\n"}
{"name": "mbpp_474_replace_char", "language": "py", "prompt": "def replace_char(str1: str, ch: str, newch: str) -> str:\n \"\"\"\n\tWrite a function to replace characters in a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_474_replace_char.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "replace_char", "test": "def check(candidate):\n assert candidate('polygon', 'y', 'l') == 'pollgon'\n assert candidate('character', 'c', 'a') == 'aharaater'\n assert candidate('python', 'l', 'a') == 'python'\n\ndef test_check():\n check(replace_char)\n\ntest_check()\n"}
{"name": "mbpp_433_check_greater", "language": "py", "prompt": "from typing import List\n\ndef check_greater(arr: List[int], number: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the entered number is greater than the elements of the given array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_433_check_greater.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_greater", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5], 4) == False\n assert candidate([2, 3, 4, 5, 6], 8) == True\n assert candidate([9, 7, 4, 8, 6, 1], 11) == True\n\ndef test_check():\n check(check_greater)\n\ntest_check()\n"}
{"name": "mbpp_427_change_date_format", "language": "py", "prompt": "def change_date_format(dt: str) -> str:\n \"\"\"\n\tWrite a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_427_change_date_format.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "change_date_format", "test": "def check(candidate):\n assert candidate('2026-01-02') == '02-01-2026'\n assert candidate('2020-11-13') == '13-11-2020'\n assert candidate('2021-04-26') == '26-04-2021'\n\ndef test_check():\n check(change_date_format)\n\ntest_check()\n"}
{"name": "mbpp_442_positive_count", "language": "py", "prompt": "from typing import List\n\ndef positive_count(nums: List[int]) -> float:\n \"\"\"\n\tWrite a function to find the ration of positive numbers in an array of integers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_442_positive_count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "positive_count", "test": "def check(candidate):\n assert candidate([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8]) == 0.54\n assert candidate([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]) == 0.69\n assert candidate([2, 4, -6, -9, 11, -12, 14, -5, 17]) == 0.56\n\ndef test_check():\n check(positive_count)\n\ntest_check()\n"}
{"name": "mbpp_453_sumofFactors", "language": "py", "prompt": "def sumofFactors(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of even factors of a number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_453_sumofFactors.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sumofFactors", "test": "def check(candidate):\n assert candidate(18) == 26\n assert candidate(30) == 48\n assert candidate(6) == 8\n\ndef test_check():\n check(sumofFactors)\n\ntest_check()\n"}
{"name": "mbpp_478_remove_lowercase", "language": "py", "prompt": "def remove_lowercase(str1: str) -> str:\n \"\"\"\n\tWrite a function to remove lowercase substrings from a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_478_remove_lowercase.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_lowercase", "test": "def check(candidate):\n assert candidate('PYTHon') == 'PYTH'\n assert candidate('FInD') == 'FID'\n assert candidate('STRinG') == 'STRG'\n\ndef test_check():\n check(remove_lowercase)\n\ntest_check()\n"}
{"name": "mbpp_18_remove_dirty_chars", "language": "py", "prompt": "def remove_dirty_chars(string: str, second_string: str) -> str:\n \"\"\"\n\tWrite a function to remove characters from the first string which are present in the second string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_18_remove_dirty_chars.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_dirty_chars", "test": "def check(candidate):\n assert candidate('probasscurve', 'pros') == 'bacuve'\n assert candidate('digitalindia', 'talent') == 'digiidi'\n assert candidate('exoticmiles', 'toxic') == 'emles'\n\ndef test_check():\n check(remove_dirty_chars)\n\ntest_check()\n"}
{"name": "mbpp_730_consecutive_duplicates", "language": "py", "prompt": "from typing import List, Any\n\ndef consecutive_duplicates(nums: List[Any]) -> List[Any]:\n \"\"\"\n\tWrite a function to remove consecutive duplicates of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_730_consecutive_duplicates.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "consecutive_duplicates", "test": "def check(candidate):\n assert candidate([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4]\n assert candidate([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]) == [10, 15, 19, 18, 17, 26, 17, 18, 10]\n assert candidate(['a', 'a', 'b', 'c', 'd', 'd']) == ['a', 'b', 'c', 'd']\n assert candidate(['a', 'a', 'b', 'c', 'd', 'd', 'a', 'a']) == ['a', 'b', 'c', 'd', 'a']\n\ndef test_check():\n check(consecutive_duplicates)\n\ntest_check()\n"}
{"name": "mbpp_446_count_Occurrence", "language": "py", "prompt": "from typing import Any, List\n\ndef count_Occurrence(tup: Any, lst: List[Any]) -> int:\n \"\"\"\n\tWrite a python function to count the occurence of all elements of list in a tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_446_count_Occurrence.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_Occurrence", "test": "def check(candidate):\n assert candidate(('a', 'a', 'c', 'b', 'd'), ['a', 'b']) == 3\n assert candidate((1, 2, 3, 1, 4, 6, 7, 1, 4), [1, 4, 7]) == 6\n assert candidate((1, 2, 3, 4, 5, 6), [1, 2]) == 2\n\ndef test_check():\n check(count_Occurrence)\n\ntest_check()\n"}
{"name": "mbpp_772_remove_length", "language": "py", "prompt": "def remove_length(test_str: str, K: int) -> str:\n \"\"\"\n\tWrite a function to remove all the words with k length in the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_772_remove_length.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_length", "test": "def check(candidate):\n assert candidate('The person is most value tet', 3) == 'person is most value'\n assert candidate('If you told me about this ok', 4) == 'If you me about ok'\n assert candidate('Forces of darkeness is come into the play', 4) == 'Forces of darkeness is the'\n\ndef test_check():\n check(remove_length)\n\ntest_check()\n"}
{"name": "mbpp_752_jacobsthal_num", "language": "py", "prompt": "def jacobsthal_num(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth jacobsthal number. https://www.geeksforgeeks.org/jacobsthal-and-jacobsthal-lucas-numbers/ 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, ...\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_752_jacobsthal_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "jacobsthal_num", "test": "def check(candidate):\n assert candidate(5) == 11\n assert candidate(2) == 1\n assert candidate(4) == 5\n assert candidate(13) == 2731\n\ndef test_check():\n check(jacobsthal_num)\n\ntest_check()\n"}
{"name": "mbpp_145_max_Abs_Diff", "language": "py", "prompt": "from typing import List\n\ndef max_Abs_Diff(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the maximum difference between any two elements in a given array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_145_max_Abs_Diff.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_Abs_Diff", "test": "def check(candidate):\n assert candidate([2, 1, 5, 3]) == 4\n assert candidate([9, 3, 2, 5, 1]) == 8\n assert candidate([3, 2, 1]) == 2\n\ndef test_check():\n check(max_Abs_Diff)\n\ntest_check()\n"}
{"name": "mbpp_572_two_unique_nums", "language": "py", "prompt": "from typing import List\n\ndef two_unique_nums(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to remove duplicate numbers from a given number of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_572_two_unique_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "two_unique_nums", "test": "def check(candidate):\n assert candidate([1, 2, 3, 2, 3, 4, 5]) == [1, 4, 5]\n assert candidate([1, 2, 3, 2, 4, 5]) == [1, 3, 4, 5]\n assert candidate([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n\ndef test_check():\n check(two_unique_nums)\n\ntest_check()\n"}
{"name": "mbpp_556_find_Odd_Pair", "language": "py", "prompt": "from typing import List\n\ndef find_Odd_Pair(A: List[int], N: int) -> int:\n \"\"\"\n\tWrite a python function to count the number of pairs whose xor value is odd.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_556_find_Odd_Pair.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Odd_Pair", "test": "def check(candidate):\n assert candidate([5, 4, 7, 2, 1], 5) == 6\n assert candidate([7, 2, 8, 1, 0, 5, 11], 7) == 12\n assert candidate([1, 2, 3], 3) == 2\n\ndef test_check():\n check(find_Odd_Pair)\n\ntest_check()\n"}
{"name": "mbpp_306_max_sum_increasing_subseq", "language": "py", "prompt": "from typing import List\n\ndef max_sum_increasing_subseq(a: List[int], n: int, index: int, k: int) -> int:\n \"\"\"\n\tWrite a function to find the maximum sum of increasing subsequence from prefix until ith index and also including a given kth element which is after i, i.e., k > i .\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_306_max_sum_increasing_subseq.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_sum_increasing_subseq", "test": "def check(candidate):\n assert candidate([1, 101, 2, 3, 100, 4, 5], 7, 4, 6) == 11\n assert candidate([1, 101, 2, 3, 100, 4, 5], 7, 2, 5) == 7\n assert candidate([11, 15, 19, 21, 26, 28, 31], 7, 2, 4) == 71\n\ndef test_check():\n check(max_sum_increasing_subseq)\n\ntest_check()\n"}
{"name": "mbpp_388_highest_Power_of_2", "language": "py", "prompt": "def highest_Power_of_2(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the highest power of 2 that is less than or equal to n.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_388_highest_Power_of_2.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "highest_Power_of_2", "test": "def check(candidate):\n assert candidate(10) == 8\n assert candidate(19) == 16\n assert candidate(32) == 32\n\ndef test_check():\n check(highest_Power_of_2)\n\ntest_check()\n"}
{"name": "mbpp_401_add_nested_tuples", "language": "py", "prompt": "from typing import List\n\ndef add_nested_tuples(test_tup1: List[List[int]], test_tup2: List[List[int]]) -> List[List[int]]:\n \"\"\"\n\tWrite a function to perform index wise addition of list elements in the given two nested lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_401_add_nested_tuples.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_nested_tuples", "test": "def check(candidate):\n assert candidate([[1, 3], [4, 5], [2, 9], [1, 10]], [[6, 7], [3, 9], [1, 1], [7, 3]]) == [[7, 10], [7, 14], [3, 10], [8, 13]]\n assert candidate([[2, 4], [5, 6], [3, 10], [2, 11]], [[7, 8], [4, 10], [2, 2], [8, 4]]) == [[9, 12], [9, 16], [5, 12], [10, 15]]\n assert candidate([[3, 5], [6, 7], [4, 11], [3, 12]], [[8, 9], [5, 11], [3, 3], [9, 5]]) == [[11, 14], [11, 18], [7, 14], [12, 17]]\n\ndef test_check():\n check(add_nested_tuples)\n\ntest_check()\n"}
{"name": "mbpp_435_last_Digit", "language": "py", "prompt": "def last_Digit(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the last digit of a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_435_last_Digit.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "last_Digit", "test": "def check(candidate):\n assert candidate(123) == 3\n assert candidate(25) == 5\n assert candidate(30) == 0\n\ndef test_check():\n check(last_Digit)\n\ntest_check()\n"}
{"name": "mbpp_611_max_of_nth", "language": "py", "prompt": "from typing import List\n\ndef max_of_nth(test_list: List[List[int]], N: int) -> int:\n \"\"\"\n\tWrite a function which given a matrix represented as a list of lists returns the max of the n'th column.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_611_max_of_nth.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_of_nth", "test": "def check(candidate):\n assert candidate([[5, 6, 7], [1, 3, 5], [8, 9, 19]], 2) == 19\n assert candidate([[6, 7, 8], [2, 4, 6], [9, 10, 20]], 1) == 10\n assert candidate([[7, 8, 9], [3, 5, 7], [10, 11, 21]], 1) == 11\n\ndef test_check():\n check(max_of_nth)\n\ntest_check()\n"}
{"name": "mbpp_280_sequential_search", "language": "py", "prompt": "from typing import List, Tuple\n\ndef sequential_search(dlist: List[int], item: int) -> Tuple[bool, int]:\n \"\"\"\n\tWrite a function that takes in an array and element and returns a tuple containing a boolean that indicates if the element is in the array and the index position of the element (or -1 if the element is not found).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_280_sequential_search.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sequential_search", "test": "def check(candidate):\n assert candidate([11, 23, 58, 31, 56, 77, 43, 12, 65, 19], 31) == (True, 3)\n assert candidate([12, 32, 45, 62, 35, 47, 44, 61], 61) == (True, 7)\n assert candidate([9, 10, 17, 19, 22, 39, 48, 56], 48) == (True, 6)\n\ndef test_check():\n check(sequential_search)\n\ntest_check()\n"}
{"name": "mbpp_576_is_Sub_Array", "language": "py", "prompt": "from typing import List\n\ndef is_Sub_Array(A: List[int], B: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether a list is sublist of another or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_576_is_Sub_Array.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_Sub_Array", "test": "def check(candidate):\n assert candidate([1, 4, 3, 5], [1, 2]) == False\n assert candidate([1, 2, 1], [1, 2, 1]) == True\n assert candidate([1, 0, 2, 2], [2, 2, 0]) == False\n\ndef test_check():\n check(is_Sub_Array)\n\ntest_check()\n"}
{"name": "mbpp_131_reverse_vowels", "language": "py", "prompt": "def reverse_vowels(str1: str) -> str:\n \"\"\"\n\tWrite a python function to reverse only the vowels of a given string (where y is not a vowel).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_131_reverse_vowels.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "reverse_vowels", "test": "def check(candidate):\n assert candidate('Python') == 'Python'\n assert candidate('USA') == 'ASU'\n assert candidate('ab') == 'ab'\n\ndef test_check():\n check(reverse_vowels)\n\ntest_check()\n"}
{"name": "mbpp_432_median_trapezium", "language": "py", "prompt": "def median_trapezium(base1: int, base2: int, height: int) -> float:\n \"\"\"\n\tWrite a function to find the median length of a trapezium.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_432_median_trapezium.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "median_trapezium", "test": "def check(candidate):\n assert candidate(15, 25, 35) == 20\n assert candidate(10, 20, 30) == 15\n assert candidate(6, 9, 4) == 7.5\n\ndef test_check():\n check(median_trapezium)\n\ntest_check()\n"}
{"name": "mbpp_161_remove_elements", "language": "py", "prompt": "from typing import List\n\ndef remove_elements(list1: List[int], list2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to remove all elements from a given list present in another list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_161_remove_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_elements", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, 8]) == [1, 3, 5, 7, 9, 10]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 5, 7]) == [2, 4, 6, 8, 9, 10]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [5, 7]) == [1, 2, 3, 4, 6, 8, 9, 10]\n\ndef test_check():\n check(remove_elements)\n\ntest_check()\n"}
{"name": "mbpp_597_find_kth", "language": "py", "prompt": "from typing import List\n\ndef find_kth(arr1: List[int], arr2: List[int], k: int) -> int:\n \"\"\"\n\tWrite a function to find kth element from the given two sorted arrays.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_597_find_kth.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_kth", "test": "def check(candidate):\n assert candidate([2, 3, 6, 7, 9], [1, 4, 8, 10], 5) == 6\n assert candidate([100, 112, 256, 349, 770], [72, 86, 113, 119, 265, 445, 892], 7) == 256\n assert candidate([3, 4, 7, 8, 10], [2, 5, 9, 11], 6) == 8\n\ndef test_check():\n check(find_kth)\n\ntest_check()\n"}
{"name": "mbpp_226_odd_values_string", "language": "py", "prompt": "def odd_values_string(str: str) -> str:\n \"\"\"\n\tWrite a python function to remove the characters which have odd index values of a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_226_odd_values_string.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "odd_values_string", "test": "def check(candidate):\n assert candidate('abcdef') == 'ace'\n assert candidate('python') == 'pto'\n assert candidate('data') == 'dt'\n assert candidate('lambs') == 'lms'\n\ndef test_check():\n check(odd_values_string)\n\ntest_check()\n"}
{"name": "mbpp_278_count_first_elements", "language": "py", "prompt": "from typing import List, Union, Tuple\n\ndef count_first_elements(test_tup: List[Union[int, Tuple[int, int]]]) -> int:\n \"\"\"\n\tWrite a function to find the number of elements that occurs before the list element in the given tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_278_count_first_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_first_elements", "test": "def check(candidate):\n assert candidate([1, 5, 7, (4, 6), 10]) == 3\n assert candidate([2, 9, (5, 7), 11]) == 2\n assert candidate([11, 15, 5, 8, (2, 3), 8]) == 4\n\ndef test_check():\n check(count_first_elements)\n\ntest_check()\n"}
{"name": "mbpp_269_ascii_value", "language": "py", "prompt": "def ascii_value(k: str) -> int:\n \"\"\"\n\tWrite a function to find the ascii value of a character.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_269_ascii_value.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "ascii_value", "test": "def check(candidate):\n assert candidate('A') == 65\n assert candidate('R') == 82\n assert candidate('S') == 83\n\ndef test_check():\n check(ascii_value)\n\ntest_check()\n"}
{"name": "mbpp_739_find_Index", "language": "py", "prompt": "def find_Index(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the index of smallest triangular number with n digits. https://www.geeksforgeeks.org/index-of-smallest-triangular-number-with-n-digits/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_739_find_Index.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Index", "test": "def check(candidate):\n assert candidate(2) == 4\n assert candidate(3) == 14\n assert candidate(4) == 45\n\ndef test_check():\n check(find_Index)\n\ntest_check()\n"}
{"name": "mbpp_19_test_duplicate", "language": "py", "prompt": "from typing import List\n\ndef test_duplicate(arraynums: List[int]) -> bool:\n \"\"\"\n\tWrite a function to find whether a given array of integers contains any duplicate element.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_19_test_duplicate.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "test_duplicate", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5]) == False\n assert candidate([1, 2, 3, 4, 4]) == True\n assert candidate([1, 1, 2, 2, 3, 3, 4, 4, 5]) == True\n\ndef test_check():\n check(test_duplicate)\n\ntest_check()\n"}
{"name": "mbpp_62_smallest_num", "language": "py", "prompt": "from typing import List\n\ndef smallest_num(xs: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find smallest number in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_62_smallest_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "smallest_num", "test": "def check(candidate):\n assert candidate([10, 20, 1, 45, 99]) == 1\n assert candidate([1, 2, 3]) == 1\n assert candidate([45, 46, 50, 60]) == 45\n\ndef test_check():\n check(smallest_num)\n\ntest_check()\n"}
{"name": "mbpp_746_sector_area", "language": "py", "prompt": "from typing import Optional\n\ndef sector_area(r: int, a: int) -> Optional[float]:\n \"\"\"\n\tWrite a function to find area of a sector. The function takes the radius and angle as inputs. Function should return None if the angle is larger than 360 degrees.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_746_sector_area.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sector_area", "test": "def check(candidate):\n assert candidate(4, 45) == 6.283185307179586\n assert candidate(9, 45) == 31.808625617596654\n assert candidate(9, 361) == None\n\ndef test_check():\n check(sector_area)\n\ntest_check()\n"}
{"name": "mbpp_142_count_samepair", "language": "py", "prompt": "from typing import List\n\ndef count_samepair(list1: List[int], list2: List[int], list3: List[int]) -> int:\n \"\"\"\n\tWrite a function to count number items that are identical in the same position of three given lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_142_count_samepair.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_samepair", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 9], [2, 1, 3, 1, 2, 6, 7, 9]) == 3\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]) == 4\n assert candidate([1, 2, 3, 4, 2, 6, 7, 8], [2, 2, 3, 1, 2, 6, 7, 8], [2, 1, 3, 1, 2, 6, 7, 8]) == 5\n\ndef test_check():\n check(count_samepair)\n\ntest_check()\n"}
{"name": "mbpp_400_extract_freq", "language": "py", "prompt": "from typing import List, Tuple\n\ndef extract_freq(test_list: List[Tuple[int, int]]) -> int:\n \"\"\"\n\tWrite a function to extract the number of unique tuples in the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_400_extract_freq.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_freq", "test": "def check(candidate):\n assert candidate([(3, 4), (1, 2), (4, 3), (5, 6)]) == 3\n assert candidate([(4, 15), (2, 3), (5, 4), (6, 7)]) == 4\n assert candidate([(5, 16), (2, 3), (6, 5), (6, 9)]) == 4\n\ndef test_check():\n check(extract_freq)\n\ntest_check()\n"}
{"name": "mbpp_595_min_Swaps", "language": "py", "prompt": "from typing import Any\n\ndef min_Swaps(str1: str, str2: str) -> Any:\n \"\"\"\n\tWrite a python function to count minimum number of swaps required to convert one binary number represented as a string to another.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_595_min_Swaps.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_Swaps", "test": "def check(candidate):\n assert candidate('1101', '1110') == 1\n assert candidate('111', '000') == 'Not Possible'\n assert candidate('111', '110') == 'Not Possible'\n\ndef test_check():\n check(min_Swaps)\n\ntest_check()\n"}
{"name": "mbpp_135_hexagonal_num", "language": "py", "prompt": "def hexagonal_num(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth hexagonal number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_135_hexagonal_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "hexagonal_num", "test": "def check(candidate):\n assert candidate(10) == 190\n assert candidate(5) == 45\n assert candidate(7) == 91\n\ndef test_check():\n check(hexagonal_num)\n\ntest_check()\n"}
{"name": "mbpp_800_remove_all_spaces", "language": "py", "prompt": "def remove_all_spaces(text: str) -> str:\n \"\"\"\n\tWrite a function to remove all whitespaces from a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_800_remove_all_spaces.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_all_spaces", "test": "def check(candidate):\n assert candidate('python program') == 'pythonprogram'\n assert candidate('python programming language') == 'pythonprogramminglanguage'\n assert candidate('python program') == 'pythonprogram'\n assert candidate(' python program') == 'pythonprogram'\n\ndef test_check():\n check(remove_all_spaces)\n\ntest_check()\n"}
{"name": "mbpp_127_multiply_int", "language": "py", "prompt": "def multiply_int(x: int, y: int) -> int:\n \"\"\"\n\tWrite a function to multiply two integers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_127_multiply_int.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "multiply_int", "test": "def check(candidate):\n assert candidate(10, 20) == 200\n assert candidate(5, 10) == 50\n assert candidate(4, 8) == 32\n\ndef test_check():\n check(multiply_int)\n\ntest_check()\n"}
{"name": "mbpp_764_number_ctr", "language": "py", "prompt": "def number_ctr(str: str) -> int:\n \"\"\"\n\tWrite a python function to count number of digits in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_764_number_ctr.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "number_ctr", "test": "def check(candidate):\n assert candidate('program2bedone') == 1\n assert candidate('3wonders') == 1\n assert candidate('123') == 3\n assert candidate('3wond-1ers2') == 3\n\ndef test_check():\n check(number_ctr)\n\ntest_check()\n"}
{"name": "mbpp_767_get_pairs_count", "language": "py", "prompt": "from typing import List\n\ndef get_pairs_count(arr: List[int], sum: int) -> int:\n \"\"\"\n\tWrite a python function to count the number of pairs whose sum is equal to sum. The funtion gets as input a list of numbers and the sum,\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_767_get_pairs_count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_pairs_count", "test": "def check(candidate):\n assert candidate([1, 1, 1, 1], 2) == 6\n assert candidate([1, 5, 7, -1, 5], 6) == 3\n assert candidate([1, -2, 3], 1) == 1\n assert candidate([-1, -2, 3], -3) == 1\n\ndef test_check():\n check(get_pairs_count)\n\ntest_check()\n"}
{"name": "mbpp_99_decimal_to_binary", "language": "py", "prompt": "def decimal_to_binary(n: int) -> str:\n \"\"\"\n\tWrite a function to convert the given decimal number to its binary equivalent, represented as a string with no leading zeros.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_99_decimal_to_binary.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "decimal_to_binary", "test": "def check(candidate):\n assert candidate(8) == '1000'\n assert candidate(18) == '10010'\n assert candidate(7) == '111'\n\ndef test_check():\n check(decimal_to_binary)\n\ntest_check()\n"}
{"name": "mbpp_119_search", "language": "py", "prompt": "from typing import List\n\ndef search(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the element that appears only once in a sorted array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_119_search.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "search", "test": "def check(candidate):\n assert candidate([1, 1, 2, 2, 3]) == 3\n assert candidate([1, 1, 3, 3, 4, 4, 5, 5, 7, 7, 8]) == 8\n assert candidate([1, 2, 2, 3, 3, 4, 4]) == 1\n\ndef test_check():\n check(search)\n\ntest_check()\n"}
{"name": "mbpp_92_is_undulating", "language": "py", "prompt": "def is_undulating(n: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given number is undulating or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_92_is_undulating.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_undulating", "test": "def check(candidate):\n assert candidate(1212121) == True\n assert candidate(1991) == False\n assert candidate(121) == True\n\ndef test_check():\n check(is_undulating)\n\ntest_check()\n"}
{"name": "mbpp_105_count", "language": "py", "prompt": "from typing import List\n\ndef count(lst: List[bool]) -> int:\n \"\"\"\n\tWrite a python function to count true booleans in the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_105_count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count", "test": "def check(candidate):\n assert candidate([True, False, True]) == 2\n assert candidate([False, False]) == 0\n assert candidate([True, True, True]) == 3\n\ndef test_check():\n check(count)\n\ntest_check()\n"}
{"name": "mbpp_766_pair_wise", "language": "py", "prompt": "from typing import List, Tuple\n\ndef pair_wise(l1: List[int]) -> List[Tuple[int, int]]:\n \"\"\"\n\tWrite a function to return a list of all pairs of consecutive items in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_766_pair_wise.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "pair_wise", "test": "def check(candidate):\n assert candidate([1, 1, 2, 3, 3, 4, 4, 5]) == [(1, 1), (1, 2), (2, 3), (3, 3), (3, 4), (4, 4), (4, 5)]\n assert candidate([1, 5, 7, 9, 10]) == [(1, 5), (5, 7), (7, 9), (9, 10)]\n assert candidate([5, 1, 9, 7, 10]) == [(5, 1), (1, 9), (9, 7), (7, 10)]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [(1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9), (9, 10)]\n\ndef test_check():\n check(pair_wise)\n\ntest_check()\n"}
{"name": "mbpp_464_check_value", "language": "py", "prompt": "from typing import Dict\n\ndef check_value(dict: Dict[str, int], n: int) -> bool:\n \"\"\"\n\tWrite a function to check if all values are same in a dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_464_check_value.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_value", "test": "def check(candidate):\n assert candidate({ 'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12 }, 10) == False\n assert candidate({ 'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12 }, 12) == True\n assert candidate({ 'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12 }, 5) == False\n\ndef test_check():\n check(check_value)\n\ntest_check()\n"}
{"name": "mbpp_443_largest_neg", "language": "py", "prompt": "from typing import List\n\ndef largest_neg(list1: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the largest negative number from the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_443_largest_neg.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "largest_neg", "test": "def check(candidate):\n assert candidate([1, 2, 3, -4, -6]) == -6\n assert candidate([1, 2, 3, -8, -9]) == -9\n assert candidate([1, 2, 3, 4, -1]) == -1\n\ndef test_check():\n check(largest_neg)\n\ntest_check()\n"}
{"name": "mbpp_602_first_repeated_char", "language": "py", "prompt": "from typing import Optional\n\ndef first_repeated_char(str1: str) -> Optional[str]:\n \"\"\"\n\tWrite a python function to find the first repeated character in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_602_first_repeated_char.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "first_repeated_char", "test": "def check(candidate):\n assert candidate('abcabc') == 'a'\n assert candidate('abc') == None\n assert candidate('123123') == '1'\n\ndef test_check():\n check(first_repeated_char)\n\ntest_check()\n"}
{"name": "mbpp_770_odd_num_sum", "language": "py", "prompt": "def odd_num_sum(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of fourth power of first n odd natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_770_odd_num_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "odd_num_sum", "test": "def check(candidate):\n assert candidate(2) == 82\n assert candidate(3) == 707\n assert candidate(4) == 3108\n\ndef test_check():\n check(odd_num_sum)\n\ntest_check()\n"}
{"name": "mbpp_424_extract_rear", "language": "py", "prompt": "from typing import Tuple, List\n\ndef extract_rear(test_tuple: Tuple[str, str, str]) -> List[str]:\n \"\"\"\n\tWrite a function to extract only the rear index element of each string in the given tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_424_extract_rear.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_rear", "test": "def check(candidate):\n assert candidate(('Mers', 'for', 'Vers')) == ['s', 'r', 's']\n assert candidate(('Avenge', 'for', 'People')) == ['e', 'r', 'e']\n assert candidate(('Gotta', 'get', 'go')) == ['a', 't', 'o']\n\ndef test_check():\n check(extract_rear)\n\ntest_check()\n"}
{"name": "mbpp_133_sum_negativenum", "language": "py", "prompt": "from typing import List\n\ndef sum_negativenum(nums: List[int]) -> int:\n \"\"\"\n\tWrite a function to calculate the sum of the negative numbers of a given list of numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_133_sum_negativenum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_negativenum", "test": "def check(candidate):\n assert candidate([2, 4, -6, -9, 11, -12, 14, -5, 17]) == -32\n assert candidate([10, 15, -14, 13, -18, 12, -20]) == -52\n assert candidate([19, -65, 57, 39, 152, -639, 121, 44, 90, -190]) == -894\n\ndef test_check():\n check(sum_negativenum)\n\ntest_check()\n"}
{"name": "mbpp_760_unique_Element", "language": "py", "prompt": "from typing import List\n\ndef unique_Element(arr: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether a list of numbers contains only one distinct element or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_760_unique_Element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "unique_Element", "test": "def check(candidate):\n assert candidate([1, 1, 1]) == True\n assert candidate([1, 2, 1, 2]) == False\n assert candidate([1, 2, 3, 4, 5]) == False\n\ndef test_check():\n check(unique_Element)\n\ntest_check()\n"}
{"name": "mbpp_281_all_unique", "language": "py", "prompt": "from typing import List\n\ndef all_unique(test_list: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check if the elements of a given list are unique or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_281_all_unique.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "all_unique", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == True\n assert candidate([1, 2, 1, 2]) == False\n assert candidate([1, 2, 3, 4, 5]) == True\n\ndef test_check():\n check(all_unique)\n\ntest_check()\n"}
{"name": "mbpp_406_find_Parity", "language": "py", "prompt": "def find_Parity(x: int) -> bool:\n \"\"\"\n\tWrite a python function to find whether the parity of a given number is odd.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_406_find_Parity.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Parity", "test": "def check(candidate):\n assert candidate(12) == False\n assert candidate(7) == True\n assert candidate(10) == False\n\ndef test_check():\n check(find_Parity)\n\ntest_check()\n"}
{"name": "mbpp_562_Find_Max_Length", "language": "py", "prompt": "from typing import List\n\ndef Find_Max_Length(lst: List[List[int]]) -> int:\n \"\"\"\n\tWrite a python function to find the length of the longest sublists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_562_Find_Max_Length.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Find_Max_Length", "test": "def check(candidate):\n assert candidate([[1], [1, 4], [5, 6, 7, 8]]) == 4\n assert candidate([[0, 1], [2, 2], [3, 2, 1]]) == 3\n assert candidate([[7], [22, 23], [13, 14, 15], [10, 20, 30, 40, 50]]) == 5\n\ndef test_check():\n check(Find_Max_Length)\n\ntest_check()\n"}
{"name": "mbpp_87_merge_dictionaries_three", "language": "py", "prompt": "from typing import Dict\n\ndef merge_dictionaries_three(dict1: Dict[str, str], dict2: Dict[str, str], dict3: Dict[str, str]) -> Dict[str, str]:\n \"\"\"\n\tWrite a function to merge three dictionaries into a single dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_87_merge_dictionaries_three.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "merge_dictionaries_three", "test": "def check(candidate):\n assert candidate({ 'R': 'Red', 'B': 'Black', 'P': 'Pink' }, { 'G': 'Green', 'W': 'White' }, { 'O': 'Orange', 'W': 'White', 'B': 'Black' }) == { 'B': 'Black', 'R': 'Red', 'P': 'Pink', 'G': 'Green', 'W': 'White', 'O': 'Orange' }\n assert candidate({ 'R': 'Red', 'B': 'Black', 'P': 'Pink' }, { 'G': 'Green', 'W': 'White' }, { 'L': 'lavender', 'B': 'Blue' }) == { 'W': 'White', 'P': 'Pink', 'B': 'Black', 'R': 'Red', 'G': 'Green', 'L': 'lavender' }\n assert candidate({ 'R': 'Red', 'B': 'Black', 'P': 'Pink' }, { 'L': 'lavender', 'B': 'Blue' }, { 'G': 'Green', 'W': 'White' }) == { 'B': 'Black', 'P': 'Pink', 'R': 'Red', 'G': 'Green', 'L': 'lavender', 'W': 'White' }\n\ndef test_check():\n check(merge_dictionaries_three)\n\ntest_check()\n"}
{"name": "mbpp_11_remove_Occ", "language": "py", "prompt": "def remove_Occ(s: str, ch: str) -> str:\n \"\"\"\n\tWrite a python function to remove first and last occurrence of a given character from the string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_11_remove_Occ.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_Occ", "test": "def check(candidate):\n assert candidate('hello', 'l') == 'heo'\n assert candidate('abcda', 'a') == 'bcd'\n assert candidate('PHP', 'P') == 'H'\n\ndef test_check():\n check(remove_Occ)\n\ntest_check()\n"}
{"name": "mbpp_751_check_min_heap", "language": "py", "prompt": "from typing import List\n\ndef check_min_heap(arr: List[int]) -> bool:\n \"\"\"\n\tWrite a function to check if the given array represents min heap or not. https://www.geeksforgeeks.org/how-to-check-if-a-given-array-represents-a-binary-heap/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_751_check_min_heap.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_min_heap", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6]) == True\n assert candidate([2, 3, 4, 5, 10, 15]) == True\n assert candidate([2, 10, 4, 5, 3, 15]) == False\n\ndef test_check():\n check(check_min_heap)\n\ntest_check()\n"}
{"name": "mbpp_410_min_val", "language": "py", "prompt": "from typing import List, Union\n\ndef min_val(listval: List[Union[str, int]]) -> int:\n \"\"\"\n\tWrite a function to find the minimum value in a given heterogeneous list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_410_min_val.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_val", "test": "def check(candidate):\n assert candidate(['Python', 3, 2, 4, 5, 'version']) == 2\n assert candidate(['Python', 15, 20, 25]) == 15\n assert candidate(['Python', 30, 20, 40, 50, 'version']) == 20\n\ndef test_check():\n check(min_val)\n\ntest_check()\n"}
{"name": "mbpp_578_interleave_lists", "language": "py", "prompt": "from typing import List\n\ndef interleave_lists(list1: List[int], list2: List[int], list3: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to interleave 3 lists of the same length into a single flat list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_578_interleave_lists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "interleave_lists", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7], [10, 20, 30, 40, 50, 60, 70], [100, 200, 300, 400, 500, 600, 700]) == [1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700]\n assert candidate([10, 20], [15, 2], [5, 10]) == [10, 15, 5, 20, 2, 10]\n assert candidate([11, 44], [10, 15], [20, 5]) == [11, 10, 20, 44, 15, 5]\n\ndef test_check():\n check(interleave_lists)\n\ntest_check()\n"}
{"name": "mbpp_90_len_log", "language": "py", "prompt": "from typing import List\n\ndef len_log(list1: List[str]) -> int:\n \"\"\"\n\tWrite a python function to find the length of the longest word.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_90_len_log.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "len_log", "test": "def check(candidate):\n assert candidate(['python', 'PHP', 'bigdata']) == 7\n assert candidate(['a', 'ab', 'abc']) == 3\n assert candidate(['small', 'big', 'tall']) == 5\n\ndef test_check():\n check(len_log)\n\ntest_check()\n"}
{"name": "mbpp_452_loss_amount", "language": "py", "prompt": "def loss_amount(actual_cost: int, sale_amount: int) -> int:\n \"\"\"\n\tWrite a function that gives loss amount on a sale if the given amount has loss else return 0.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_452_loss_amount.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "loss_amount", "test": "def check(candidate):\n assert candidate(1500, 1200) == 0\n assert candidate(100, 200) == 100\n assert candidate(2000, 5000) == 3000\n\ndef test_check():\n check(loss_amount)\n\ntest_check()\n"}
{"name": "mbpp_798__sum", "language": "py", "prompt": "from typing import List\n\ndef _sum(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the sum of an array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_798__sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "_sum", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == 6\n assert candidate([15, 12, 13, 10]) == 50\n assert candidate([0, 1, 2]) == 3\n\ndef test_check():\n check(_sum)\n\ntest_check()\n"}
{"name": "mbpp_393_max_length_list", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_length_list(input_list: List[List[int]]) -> Tuple[int, List[int]]:\n \"\"\"\n\tWrite a function to find the list with maximum length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_393_max_length_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_length_list", "test": "def check(candidate):\n assert candidate([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]]) == (3, [13, 15, 17])\n assert candidate([[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3], [1, 2], [1]]) == (5, [1, 2, 3, 4, 5])\n assert candidate([[3, 4, 5], [6, 7, 8, 9], [10, 11, 12]]) == (4, [6, 7, 8, 9])\n\ndef test_check():\n check(max_length_list)\n\ntest_check()\n"}
{"name": "mbpp_272_rear_extract", "language": "py", "prompt": "from typing import List, Tuple\n\ndef rear_extract(test_list: List[Tuple[int, str, int]]) -> List[int]:\n \"\"\"\n\tWrite a function that takes in a list of tuples and returns a list containing the rear element of each tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_272_rear_extract.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "rear_extract", "test": "def check(candidate):\n assert candidate([(1, 'Rash', 21), (2, 'Varsha', 20), (3, 'Kil', 19)]) == [21, 20, 19]\n assert candidate([(1, 'Sai', 36), (2, 'Ayesha', 25), (3, 'Salman', 45)]) == [36, 25, 45]\n assert candidate([(1, 'Sudeep', 14), (2, 'Vandana', 36), (3, 'Dawood', 56)]) == [14, 36, 56]\n\ndef test_check():\n check(rear_extract)\n\ntest_check()\n"}
{"name": "mbpp_564_count_Pairs", "language": "py", "prompt": "from typing import List\n\ndef count_Pairs(arr: List[int], n: int) -> int:\n \"\"\"\n\tWrite a python function which takes a list of integers and counts the number of possible unordered pairs where both elements are unequal.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_564_count_Pairs.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_Pairs", "test": "def check(candidate):\n assert candidate([1, 2, 1], 3) == 2\n assert candidate([1, 1, 1, 1], 4) == 0\n assert candidate([1, 2, 3, 4, 5], 5) == 10\n\ndef test_check():\n check(count_Pairs)\n\ntest_check()\n"}
{"name": "mbpp_438_count_bidirectional", "language": "py", "prompt": "from typing import List, Tuple\n\ndef count_bidirectional(test_list: List[Tuple[int, int]]) -> int:\n \"\"\"\n\tWrite a function to count bidirectional tuple pairs.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_438_count_bidirectional.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_bidirectional", "test": "def check(candidate):\n assert candidate([(5, 6), (1, 2), (6, 5), (9, 1), (6, 5), (2, 1)]) == 3\n assert candidate([(5, 6), (1, 3), (6, 5), (9, 1), (6, 5), (2, 1)]) == 2\n assert candidate([(5, 6), (1, 2), (6, 5), (9, 2), (6, 5), (2, 1)]) == 4\n\ndef test_check():\n check(count_bidirectional)\n\ntest_check()\n"}
{"name": "mbpp_640_remove_parenthesis", "language": "py", "prompt": "from typing import List\n\ndef remove_parenthesis(items: List[str]) -> str:\n \"\"\"\n\tWrite a function to remove the parenthesis and what is inbetween them from a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_640_remove_parenthesis.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_parenthesis", "test": "def check(candidate):\n assert candidate(['python (chrome)']) == 'python'\n assert candidate(['string(.abc)']) == 'string'\n assert candidate(['alpha(num)']) == 'alpha'\n\ndef test_check():\n check(remove_parenthesis)\n\ntest_check()\n"}
{"name": "mbpp_72_dif_Square", "language": "py", "prompt": "def dif_Square(n: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given number can be represented as the difference of two squares or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_72_dif_Square.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "dif_Square", "test": "def check(candidate):\n assert candidate(5) == True\n assert candidate(10) == False\n assert candidate(15) == True\n\ndef test_check():\n check(dif_Square)\n\ntest_check()\n"}
{"name": "mbpp_448_cal_sum", "language": "py", "prompt": "def cal_sum(n: int) -> int:\n \"\"\"\n\tWrite a function to calculate the sum of perrin numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_448_cal_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "cal_sum", "test": "def check(candidate):\n assert candidate(9) == 49\n assert candidate(10) == 66\n assert candidate(11) == 88\n\ndef test_check():\n check(cal_sum)\n\ntest_check()\n"}
{"name": "mbpp_96_divisor", "language": "py", "prompt": "def divisor(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the number of divisors of a given integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_96_divisor.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "divisor", "test": "def check(candidate):\n assert candidate(15) == 4\n assert candidate(12) == 6\n assert candidate(9) == 3\n\ndef test_check():\n check(divisor)\n\ntest_check()\n"}
{"name": "mbpp_296_get_Inv_Count", "language": "py", "prompt": "from typing import List\n\ndef get_Inv_Count(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to count inversions in an array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_296_get_Inv_Count.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_Inv_Count", "test": "def check(candidate):\n assert candidate([1, 20, 6, 4, 5]) == 5\n assert candidate([1, 2, 1]) == 1\n assert candidate([1, 2, 5, 6, 1]) == 3\n\ndef test_check():\n check(get_Inv_Count)\n\ntest_check()\n"}
{"name": "mbpp_57_find_Max_Num", "language": "py", "prompt": "from typing import List\n\ndef find_Max_Num(arr: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the largest number that can be formed with the given list of digits.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_57_find_Max_Num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Max_Num", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == 321\n assert candidate([4, 5, 6, 1]) == 6541\n assert candidate([1, 2, 3, 9]) == 9321\n\ndef test_check():\n check(find_Max_Num)\n\ntest_check()\n"}
{"name": "mbpp_614_cummulative_sum", "language": "py", "prompt": "from typing import List\n\ndef cummulative_sum(test_list: List[List[int]]) -> int:\n \"\"\"\n\tWrite a function to find the cumulative sum of all the values that are present in the given list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_614_cummulative_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "cummulative_sum", "test": "def check(candidate):\n assert candidate([[1, 3], [5, 6, 7], [2, 6]]) == 30\n assert candidate([[2, 4], [6, 7, 8], [3, 7]]) == 37\n assert candidate([[3, 5], [7, 8, 9], [4, 8]]) == 44\n\ndef test_check():\n check(cummulative_sum)\n\ntest_check()\n"}
{"name": "mbpp_623_nth_nums", "language": "py", "prompt": "from typing import List\n\ndef nth_nums(nums: List[int], n: int) -> List[int]:\n \"\"\"\n\tWrite a function to compute the n-th power of each number in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_623_nth_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "nth_nums", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2) == [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]\n assert candidate([10, 20, 30], 3) == [1000, 8000, 27000]\n assert candidate([12, 15], 5) == [248832, 759375]\n\ndef test_check():\n check(nth_nums)\n\ntest_check()\n"}
{"name": "mbpp_799_left_rotate", "language": "py", "prompt": "def left_rotate(n: int, d: int) -> int:\n \"\"\"\n\tWrite a function to that rotate left bits by d bits a given number. We assume that the number is 32 bit.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_799_left_rotate.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "left_rotate", "test": "def check(candidate):\n assert candidate(16, 2) == 64\n assert candidate(10, 2) == 40\n assert candidate(99, 3) == 792\n assert candidate(99, 3) == 792\n assert candidate(1, 3) == 8\n assert candidate(5, 3) == 40\n assert candidate(29, 3) == 232\n\ndef test_check():\n check(left_rotate)\n\ntest_check()\n"}
{"name": "mbpp_247_lps", "language": "py", "prompt": "def lps(str: str) -> int:\n \"\"\"\n\tWrite a function to find the length of the longest palindromic subsequence in the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_247_lps.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "lps", "test": "def check(candidate):\n assert candidate('TENS FOR TENS') == 5\n assert candidate('CARDIO FOR CARDS') == 7\n assert candidate('PART OF THE JOURNEY IS PART') == 9\n\ndef test_check():\n check(lps)\n\ntest_check()\n"}
{"name": "mbpp_735_toggle_middle_bits", "language": "py", "prompt": "def toggle_middle_bits(n: int) -> int:\n \"\"\"\n\tWrite a python function to toggle bits of the number except the first and the last bit. https://www.geeksforgeeks.org/toggle-bits-number-expect-first-last-bits/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_735_toggle_middle_bits.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "toggle_middle_bits", "test": "def check(candidate):\n assert candidate(9) == 15\n assert candidate(10) == 12\n assert candidate(11) == 13\n assert candidate(65) == 127\n assert candidate(77) == 115\n\ndef test_check():\n check(toggle_middle_bits)\n\ntest_check()\n"}
{"name": "mbpp_132_tup_string", "language": "py", "prompt": "from typing import List\n\ndef tup_string(tup1: List[str]) -> str:\n \"\"\"\n\tWrite a function to convert a list to a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_132_tup_string.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tup_string", "test": "def check(candidate):\n assert candidate(['e', 'x', 'e', 'r', 'c', 'i', 's', 'e', 's']) == 'exercises'\n assert candidate(['p', 'y', 't', 'h', 'o', 'n']) == 'python'\n assert candidate(['p', 'r', 'o', 'g', 'r', 'a', 'm']) == 'program'\n\ndef test_check():\n check(tup_string)\n\ntest_check()\n"}
{"name": "mbpp_460_Extract", "language": "py", "prompt": "from typing import List\n\ndef Extract(lst: List[List[int]]) -> List[int]:\n \"\"\"\n\tWrite a python function to get the first element of each sublist.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_460_Extract.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Extract", "test": "def check(candidate):\n assert candidate([[1, 2], [3, 4, 5], [6, 7, 8, 9]]) == [1, 3, 6]\n assert candidate([[1, 2, 3], [4, 5]]) == [1, 4]\n assert candidate([[9, 8, 1], [1, 2]]) == [9, 1]\n\ndef test_check():\n check(Extract)\n\ntest_check()\n"}
{"name": "mbpp_606_radian_degree", "language": "py", "prompt": "def radian_degree(degree: int) -> float:\n \"\"\"\n\tWrite a function to convert degrees to radians.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_606_radian_degree.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "radian_degree", "test": "def check(candidate):\n assert candidate(90) == 1.5707963267948966\n assert candidate(60) == 1.0471975511965976\n assert candidate(120) == 2.0943951023931953\n\ndef test_check():\n check(radian_degree)\n\ntest_check()\n"}
{"name": "mbpp_167_next_power_of_2", "language": "py", "prompt": "def next_power_of_2(n: int) -> int:\n \"\"\"\n\tWrite a python function to find the smallest power of 2 greater than or equal to n.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_167_next_power_of_2.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "next_power_of_2", "test": "def check(candidate):\n assert candidate(0) == 1\n assert candidate(5) == 8\n assert candidate(17) == 32\n\ndef test_check():\n check(next_power_of_2)\n\ntest_check()\n"}
{"name": "mbpp_756_text_match_zero_one", "language": "py", "prompt": "def text_match_zero_one(text: str) -> bool:\n \"\"\"\n\tWrite a function that matches a string that has an 'a' followed by one or more 'b's. https://www.w3resource.com/python-exercises/re/python-re-exercise-3.php\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_756_text_match_zero_one.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_zero_one", "test": "def check(candidate):\n assert candidate('ac') == False\n assert candidate('dc') == False\n assert candidate('abbbba') == True\n assert candidate('dsabbbba') == True\n assert candidate('asbbbba') == False\n assert candidate('abaaa') == True\n\ndef test_check():\n check(text_match_zero_one)\n\ntest_check()\n"}
{"name": "mbpp_633_pair_xor_Sum", "language": "py", "prompt": "from typing import List\n\ndef pair_xor_Sum(arr: List[int], n: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of xor of all pairs of numbers in the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_633_pair_xor_Sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "pair_xor_Sum", "test": "def check(candidate):\n assert candidate([5, 9, 7, 6], 4) == 47\n assert candidate([7, 3, 5], 3) == 12\n assert candidate([7, 3], 2) == 4\n\ndef test_check():\n check(pair_xor_Sum)\n\ntest_check()\n"}
{"name": "mbpp_458_rectangle_area", "language": "py", "prompt": "def rectangle_area(l: int, b: int) -> int:\n \"\"\"\n\tWrite a function to find the area of a rectangle.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_458_rectangle_area.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "rectangle_area", "test": "def check(candidate):\n assert candidate(10, 20) == 200\n assert candidate(10, 5) == 50\n assert candidate(4, 2) == 8\n\ndef test_check():\n check(rectangle_area)\n\ntest_check()\n"}
{"name": "mbpp_738_geometric_sum", "language": "py", "prompt": "def geometric_sum(n: int) -> float:\n \"\"\"\n\tWrite a function to calculate the geometric sum of n-1. https://www.w3resource.com/python-exercises/data-structures-and-algorithms/python-recursion-exercise-9.php\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_738_geometric_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "geometric_sum", "test": "def check(candidate):\n assert candidate(7) == 1.9921875\n assert candidate(4) == 1.9375\n assert candidate(8) == 1.99609375\n\ndef test_check():\n check(geometric_sum)\n\ntest_check()\n"}
{"name": "mbpp_426_filter_oddnumbers", "language": "py", "prompt": "from typing import List\n\ndef filter_oddnumbers(nums: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to filter odd numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_426_filter_oddnumbers.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "filter_oddnumbers", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 3, 5, 7, 9]\n assert candidate([10, 20, 45, 67, 84, 93]) == [45, 67, 93]\n assert candidate([5, 7, 9, 8, 6, 4, 3]) == [5, 7, 9, 3]\n\ndef test_check():\n check(filter_oddnumbers)\n\ntest_check()\n"}
{"name": "mbpp_437_remove_odd", "language": "py", "prompt": "def remove_odd(str1: str) -> str:\n \"\"\"\n\tWrite a function to remove odd characters in a string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_437_remove_odd.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_odd", "test": "def check(candidate):\n assert candidate('python') == 'yhn'\n assert candidate('program') == 'rga'\n assert candidate('language') == 'agae'\n\ndef test_check():\n check(remove_odd)\n\ntest_check()\n"}
{"name": "mbpp_227_min_of_three", "language": "py", "prompt": "def min_of_three(a: int, b: int, c: int) -> int:\n \"\"\"\n\tWrite a function to find minimum of three numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_227_min_of_three.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_of_three", "test": "def check(candidate):\n assert candidate(10, 20, 0) == 0\n assert candidate(19, 15, 18) == 15\n assert candidate(-10, -20, -30) == -30\n\ndef test_check():\n check(min_of_three)\n\ntest_check()\n"}
{"name": "mbpp_172_count_occurance", "language": "py", "prompt": "def count_occurance(s: str) -> int:\n \"\"\"\n\tWrite a function to count the number of occurence of the string 'std' in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_172_count_occurance.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_occurance", "test": "def check(candidate):\n assert candidate('letstdlenstdporstd') == 3\n assert candidate('truststdsolensporsd') == 1\n assert candidate('makestdsostdworthit') == 2\n assert candidate('stds') == 1\n assert candidate('') == 0\n\ndef test_check():\n check(count_occurance)\n\ntest_check()\n"}
{"name": "mbpp_434_text_match_one", "language": "py", "prompt": "def text_match_one(text: str) -> bool:\n \"\"\"\n\tWrite a function that matches a string that has an a followed by one or more b's.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_434_text_match_one.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_one", "test": "def check(candidate):\n assert candidate('ac') == False\n assert candidate('dc') == False\n assert candidate('abba') == True\n\ndef test_check():\n check(text_match_one)\n\ntest_check()\n"}
{"name": "mbpp_291_count_no_of_ways", "language": "py", "prompt": "def count_no_of_ways(n: int, k: int) -> int:\n \"\"\"\n\tWrite a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_291_count_no_of_ways.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_no_of_ways", "test": "def check(candidate):\n assert candidate(2, 4) == 16\n assert candidate(3, 2) == 6\n assert candidate(4, 4) == 228\n\ndef test_check():\n check(count_no_of_ways)\n\ntest_check()\n"}
{"name": "mbpp_471_find_remainder", "language": "py", "prompt": "from typing import List\n\ndef find_remainder(arr: List[int], n: int) -> int:\n \"\"\"\n\tWrite a python function to find the product of the array multiplication modulo n.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_471_find_remainder.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_remainder", "test": "def check(candidate):\n assert candidate([100, 10, 5, 25, 35, 14], 11) == 9\n assert candidate([1, 1, 1], 1) == 0\n assert candidate([1, 2, 1], 2) == 0\n\ndef test_check():\n check(find_remainder)\n\ntest_check()\n"}
{"name": "mbpp_808_check_K", "language": "py", "prompt": "from typing import List\n\ndef check_K(test_tup: List[int], K: int) -> bool:\n \"\"\"\n\tWrite a function to check if the given tuples contain the k or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_808_check_K.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_K", "test": "def check(candidate):\n assert candidate([10, 4, 5, 6, 8], 6) == True\n assert candidate([1, 2, 3, 4, 5, 6], 7) == False\n assert candidate([7, 8, 9, 44, 11, 12], 11) == True\n\ndef test_check():\n check(check_K)\n\ntest_check()\n"}
{"name": "mbpp_68_is_Monotonic", "language": "py", "prompt": "from typing import List\n\ndef is_Monotonic(A: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given array is monotonic or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_68_is_Monotonic.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_Monotonic", "test": "def check(candidate):\n assert candidate([6, 5, 4, 4]) == True\n assert candidate([1, 2, 2, 3]) == True\n assert candidate([1, 3, 2]) == False\n\ndef test_check():\n check(is_Monotonic)\n\ntest_check()\n"}
{"name": "mbpp_430_parabola_directrix", "language": "py", "prompt": "def parabola_directrix(a: int, b: int, c: int) -> int:\n \"\"\"\n\tWrite a function to find the directrix of a parabola.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_430_parabola_directrix.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "parabola_directrix", "test": "def check(candidate):\n assert candidate(5, 3, 2) == -198\n assert candidate(9, 8, 4) == -2336\n assert candidate(2, 4, 6) == -130\n\ndef test_check():\n check(parabola_directrix)\n\ntest_check()\n"}
{"name": "mbpp_618_div_list", "language": "py", "prompt": "from typing import List\n\ndef div_list(nums1: List[int], nums2: List[int]) -> List[float]:\n \"\"\"\n\tWrite a function to divide two lists element wise.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_618_div_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "div_list", "test": "def check(candidate):\n assert candidate([4, 5, 6], [1, 2, 3]) == [4.0, 2.5, 2.0]\n assert candidate([3, 2], [1, 4]) == [3.0, 0.5]\n assert candidate([90, 120], [50, 70]) == [1.8, 1.7142857142857142]\n\ndef test_check():\n check(div_list)\n\ntest_check()\n"}
{"name": "mbpp_421_concatenate_tuple", "language": "py", "prompt": "from typing import Tuple\n\ndef concatenate_tuple(test_tup: Tuple[str, str, int, str]) -> str:\n \"\"\"\n\tWrite a function to concatenate each element of tuple by the delimiter.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_421_concatenate_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "concatenate_tuple", "test": "def check(candidate):\n assert candidate(('ID', 'is', 4, 'UTS')) == 'ID-is-4-UTS'\n assert candidate(('QWE', 'is', 4, 'RTY')) == 'QWE-is-4-RTY'\n assert candidate(('ZEN', 'is', 4, 'OP')) == 'ZEN-is-4-OP'\n\ndef test_check():\n check(concatenate_tuple)\n\ntest_check()\n"}
{"name": "mbpp_750_add_tuple", "language": "py", "prompt": "from typing import List, Tuple\n\ndef add_tuple(test_list: List[int], test_tup: Tuple[int, int]) -> List[int]:\n \"\"\"\n\tWrite a function to add the given tuple to the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_750_add_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "add_tuple", "test": "def check(candidate):\n assert candidate([5, 6, 7], (9, 10)) == [5, 6, 7, 9, 10]\n assert candidate([6, 7, 8], (10, 11)) == [6, 7, 8, 10, 11]\n assert candidate([7, 8, 9], (11, 12)) == [7, 8, 9, 11, 12]\n\ndef test_check():\n check(add_tuple)\n\ntest_check()\n"}
{"name": "mbpp_304_find_Element", "language": "py", "prompt": "from typing import List\n\ndef find_Element(arr: List[int], ranges: List[List[int]], rotations: int, index: int) -> int:\n \"\"\"\n\tWrite a python function to find element at a given index after number of rotations.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_304_find_Element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_Element", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5], [[0, 2], [0, 3]], 2, 1) == 3\n assert candidate([1, 2, 3, 4], [[0, 1], [0, 2]], 1, 2) == 3\n assert candidate([1, 2, 3, 4, 5, 6], [[0, 1], [0, 2]], 1, 1) == 1\n\ndef test_check():\n check(find_Element)\n\ntest_check()\n"}
{"name": "mbpp_740_tuple_to_dict", "language": "py", "prompt": "from typing import Tuple, Dict\n\ndef tuple_to_dict(test_tup: Tuple[int, int, int, int, int, int]) -> Dict[int, int]:\n \"\"\"\n\tWrite a function to convert the given tuple to a key-value dictionary using adjacent elements. https://www.geeksforgeeks.org/python-convert-tuple-to-adjacent-pair-dictionary/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_740_tuple_to_dict.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tuple_to_dict", "test": "def check(candidate):\n assert candidate((1, 5, 7, 10, 13, 5)) == { 1: 5, 7: 10, 13: 5 }\n assert candidate((1, 2, 3, 4, 5, 6)) == { 1: 2, 3: 4, 5: 6 }\n assert candidate((7, 8, 9, 10, 11, 12)) == { 7: 8, 9: 10, 11: 12 }\n\ndef test_check():\n check(tuple_to_dict)\n\ntest_check()\n"}
{"name": "mbpp_627_find_First_Missing", "language": "py", "prompt": "from typing import List\n\ndef find_First_Missing(array: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the smallest missing number from a sorted list of natural numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_627_find_First_Missing.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_First_Missing", "test": "def check(candidate):\n assert candidate([0, 1, 2, 3]) == 4\n assert candidate([0, 1, 2, 6, 9]) == 3\n assert candidate([2, 3, 5, 8, 9]) == 0\n\ndef test_check():\n check(find_First_Missing)\n\ntest_check()\n"}
{"name": "mbpp_294_max_val", "language": "py", "prompt": "from typing import List, Union\n\ndef max_val(listval: List[Union[str, int]]) -> int:\n \"\"\"\n\tWrite a function to find the maximum value in a given heterogeneous list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_294_max_val.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_val", "test": "def check(candidate):\n assert candidate(['Python', 3, 2, 4, 5, 'version']) == 5\n assert candidate(['Python', 15, 20, 25]) == 25\n assert candidate(['Python', 30, 20, 40, 50, 'version']) == 50\n\ndef test_check():\n check(max_val)\n\ntest_check()\n"}
{"name": "mbpp_165_count_char_position", "language": "py", "prompt": "def count_char_position(str1: str) -> int:\n \"\"\"\n\tWrite a function to count the number of characters in a string that occur at the same position in the string as in the English alphabet (case insensitive).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_165_count_char_position.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_char_position", "test": "def check(candidate):\n assert candidate('xbcefg') == 2\n assert candidate('ABcED') == 3\n assert candidate('AbgdeF') == 5\n\ndef test_check():\n check(count_char_position)\n\ntest_check()\n"}
{"name": "mbpp_589_perfect_squares", "language": "py", "prompt": "from typing import List\n\ndef perfect_squares(a: int, b: int) -> List[int]:\n \"\"\"\n\tWrite a function to find perfect squares between two given numbers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_589_perfect_squares.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "perfect_squares", "test": "def check(candidate):\n assert candidate(1, 30) == [1, 4, 9, 16, 25]\n assert candidate(50, 100) == [64, 81, 100]\n assert candidate(100, 200) == [100, 121, 144, 169, 196]\n\ndef test_check():\n check(perfect_squares)\n\ntest_check()\n"}
{"name": "mbpp_744_check_none", "language": "py", "prompt": "from typing import Any\n\ndef check_none(test_tup: Any) -> bool:\n \"\"\"\n\tWrite a function to check if the given tuple has any none value or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_744_check_none.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_none", "test": "def check(candidate):\n assert candidate((10, 4, 5, 6, None)) == True\n assert candidate((7, 8, 9, 11, 14)) == False\n assert candidate((1, 2, 3, 4, None)) == True\n\ndef test_check():\n check(check_none)\n\ntest_check()\n"}
{"name": "mbpp_726_multiply_elements", "language": "py", "prompt": "from typing import List, Any\n\ndef multiply_elements(test_tup: List[int]) -> List[Any]:\n \"\"\"\n\tWrite a function that takes as input a list of numbers (t_1,...,t_{N+1}) and returns a list of length N where the i-th element of the tuple is equal to t_i * t_{i+1}.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_726_multiply_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "multiply_elements", "test": "def check(candidate):\n assert candidate([1, 5, 7, 8, 10]) == [5, 35, 56, 80]\n assert candidate([2, 4, 5, 6, 7]) == [8, 20, 30, 42]\n assert candidate([12, 13, 14, 9, 15]) == [156, 182, 126, 135]\n assert candidate([12]) == []\n\ndef test_check():\n check(multiply_elements)\n\ntest_check()\n"}
{"name": "mbpp_736_left_insertion", "language": "py", "prompt": "from typing import List\n\ndef left_insertion(a: List[int], x: int) -> int:\n \"\"\"\n\tWrite a function to locate the left insertion point for a specified value in sorted order. https://www.w3resource.com/python-exercises/data-structures-and-algorithms/python-data-structure-exercise-24.php\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_736_left_insertion.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "left_insertion", "test": "def check(candidate):\n assert candidate([1, 2, 4, 5], 6) == 4\n assert candidate([1, 2, 4, 5], 3) == 2\n assert candidate([1, 2, 4, 5], 7) == 4\n\ndef test_check():\n check(left_insertion)\n\ntest_check()\n"}
{"name": "mbpp_63_max_difference", "language": "py", "prompt": "from typing import List, Tuple\n\ndef max_difference(test_list: List[Tuple[int, int]]) -> int:\n \"\"\"\n\tWrite a function to find the maximum difference between available pairs in the given tuple list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_63_max_difference.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "max_difference", "test": "def check(candidate):\n assert candidate([(3, 5), (1, 7), (10, 3), (1, 2)]) == 7\n assert candidate([(4, 6), (2, 17), (9, 13), (11, 12)]) == 15\n assert candidate([(12, 35), (21, 27), (13, 23), (41, 22)]) == 23\n\ndef test_check():\n check(max_difference)\n\ntest_check()\n"}
{"name": "mbpp_264_dog_age", "language": "py", "prompt": "def dog_age(h_age: int) -> int:\n \"\"\"\n\tWrite a function to calculate a dog's age in dog's years.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_264_dog_age.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "dog_age", "test": "def check(candidate):\n assert candidate(12) == 61\n assert candidate(15) == 73\n assert candidate(24) == 109\n\ndef test_check():\n check(dog_age)\n\ntest_check()\n"}
{"name": "mbpp_273_substract_elements", "language": "py", "prompt": "from typing import Tuple\n\ndef substract_elements(test_tup1: Tuple[int, int, int], test_tup2: Tuple[int, int, int]) -> Tuple[int, int, int]:\n \"\"\"\n\tWrite a function that takes in two tuples and subtracts the elements of the first tuple by the elements of the second tuple with the same index.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_273_substract_elements.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "substract_elements", "test": "def check(candidate):\n assert candidate((10, 4, 5), (2, 5, 18)) == (8, -1, -13)\n assert candidate((11, 2, 3), (24, 45, 16)) == (-13, -43, -13)\n assert candidate((7, 18, 9), (10, 11, 12)) == (-3, 7, -3)\n\ndef test_check():\n check(substract_elements)\n\ntest_check()\n"}
{"name": "mbpp_83_get_Char", "language": "py", "prompt": "def get_Char(strr: str) -> str:\n \"\"\"\n\tWrite a python function to find the character made by adding the ASCII value of all the characters of the given string modulo 26.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_83_get_Char.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_Char", "test": "def check(candidate):\n assert candidate('abc') == 'f'\n assert candidate('gfg') == 't'\n assert candidate('ab') == 'c'\n\ndef test_check():\n check(get_Char)\n\ntest_check()\n"}
{"name": "mbpp_91_find_substring", "language": "py", "prompt": "from typing import List\n\ndef find_substring(str1: List[str], sub_str: str) -> bool:\n \"\"\"\n\tWrite a function to check if a string is present as a substring in a given list of string values.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_91_find_substring.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_substring", "test": "def check(candidate):\n assert candidate(['red', 'black', 'white', 'green', 'orange'], 'ack') == True\n assert candidate(['red', 'black', 'white', 'green', 'orange'], 'abc') == False\n assert candidate(['red', 'black', 'white', 'green', 'orange'], 'ange') == True\n\ndef test_check():\n check(find_substring)\n\ntest_check()\n"}
{"name": "mbpp_100_next_smallest_palindrome", "language": "py", "prompt": "def next_smallest_palindrome(num: int) -> int:\n \"\"\"\n\tWrite a function to find the next smallest palindrome of a specified integer, returned as an integer.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_100_next_smallest_palindrome.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "next_smallest_palindrome", "test": "def check(candidate):\n assert candidate(99) == 101\n assert candidate(1221) == 1331\n assert candidate(120) == 121\n\ndef test_check():\n check(next_smallest_palindrome)\n\ntest_check()\n"}
{"name": "mbpp_282_sub_list", "language": "py", "prompt": "from typing import List\n\ndef sub_list(nums1: List[int], nums2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to subtract two lists element-wise.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_282_sub_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sub_list", "test": "def check(candidate):\n assert candidate([1, 2, 3], [4, 5, 6]) == [-3, -3, -3]\n assert candidate([1, 2], [3, 4]) == [-2, -2]\n assert candidate([90, 120], [50, 70]) == [40, 50]\n\ndef test_check():\n check(sub_list)\n\ntest_check()\n"}
{"name": "mbpp_790_even_position", "language": "py", "prompt": "from typing import List\n\ndef even_position(nums: List[int]) -> bool:\n \"\"\"\n\tWrite a python function to check whether every even index contains even numbers of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_790_even_position.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "even_position", "test": "def check(candidate):\n assert candidate([3, 2, 1]) == False\n assert candidate([1, 2, 3]) == False\n assert candidate([2, 1, 4]) == True\n\ndef test_check():\n check(even_position)\n\ntest_check()\n"}
{"name": "mbpp_411_snake_to_camel", "language": "py", "prompt": "def snake_to_camel(word: str) -> str:\n \"\"\"\n\tWrite a function to convert the given snake case string to camel case string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_411_snake_to_camel.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "snake_to_camel", "test": "def check(candidate):\n assert candidate('android_tv') == 'AndroidTv'\n assert candidate('google_pixel') == 'GooglePixel'\n assert candidate('apple_watch') == 'AppleWatch'\n\ndef test_check():\n check(snake_to_camel)\n\ntest_check()\n"}
{"name": "mbpp_754_extract_index_list", "language": "py", "prompt": "from typing import List, Any\n\ndef extract_index_list(l1: List[int], l2: List[int], l3: List[int]) -> List[Any]:\n \"\"\"\n\tWe say that an element is common for lists l1, l2, l3 if it appears in all three lists under the same index. Write a function to find common elements from three lists. The function should return a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_754_extract_index_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "extract_index_list", "test": "def check(candidate):\n assert candidate([1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]) == [1, 7]\n assert candidate([1, 1, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 6, 5], [0, 1, 2, 3, 4, 6, 7]) == [1, 6]\n assert candidate([1, 1, 3, 4, 6, 5, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]) == [1, 5]\n assert candidate([1, 2, 3, 4, 6, 6, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7]) == []\n\ndef test_check():\n check(extract_index_list)\n\ntest_check()\n"}
{"name": "mbpp_56_checks", "language": "py", "prompt": "def checks(n: int) -> bool:\n \"\"\"\n\tWrite a python function to check if a given number is one less than twice its reverse.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_56_checks.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "checks", "test": "def check(candidate):\n assert candidate(70) == False\n assert candidate(23) == False\n assert candidate(73) == True\n\ndef test_check():\n check(checks)\n\ntest_check()\n"}
{"name": "mbpp_724_power_base_sum", "language": "py", "prompt": "def power_base_sum(base: int, power: int) -> int:\n \"\"\"\n\tWrite a function that takes base and power as arguments and calculate the sum of all digits of the base to the specified power.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_724_power_base_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "power_base_sum", "test": "def check(candidate):\n assert candidate(2, 100) == 115\n assert candidate(8, 10) == 37\n assert candidate(8, 15) == 62\n assert candidate(3, 3) == 9\n\ndef test_check():\n check(power_base_sum)\n\ntest_check()\n"}
{"name": "mbpp_268_find_star_num", "language": "py", "prompt": "def find_star_num(n: int) -> int:\n \"\"\"\n\tWrite a function to find the n'th star number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_268_find_star_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_star_num", "test": "def check(candidate):\n assert candidate(3) == 37\n assert candidate(4) == 73\n assert candidate(5) == 121\n\ndef test_check():\n check(find_star_num)\n\ntest_check()\n"}
{"name": "mbpp_251_insert_element", "language": "py", "prompt": "from typing import List\n\ndef insert_element(list: List[str], element: str) -> List[str]:\n \"\"\"\n\tWrite a function that takes in a list and an element and inserts the element before each element in the list, and returns the resulting list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_251_insert_element.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "insert_element", "test": "def check(candidate):\n assert candidate(['Red', 'Green', 'Black'], 'c') == ['c', 'Red', 'c', 'Green', 'c', 'Black']\n assert candidate(['python', 'java'], 'program') == ['program', 'python', 'program', 'java']\n assert candidate(['happy', 'sad'], 'laugh') == ['laugh', 'happy', 'laugh', 'sad']\n\ndef test_check():\n check(insert_element)\n\ntest_check()\n"}
{"name": "mbpp_428_shell_sort", "language": "py", "prompt": "from typing import List\n\ndef shell_sort(my_list: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to sort the given array by using shell sort.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_428_shell_sort.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "shell_sort", "test": "def check(candidate):\n assert candidate([12, 23, 4, 5, 3, 2, 12, 81, 56, 95]) == [2, 3, 4, 5, 12, 12, 23, 56, 81, 95]\n assert candidate([24, 22, 39, 34, 87, 73, 68]) == [22, 24, 34, 39, 68, 73, 87]\n assert candidate([32, 30, 16, 96, 82, 83, 74]) == [16, 30, 32, 74, 82, 83, 96]\n\ndef test_check():\n check(shell_sort)\n\ntest_check()\n"}
{"name": "mbpp_476_big_sum", "language": "py", "prompt": "from typing import List\n\ndef big_sum(nums: List[int]) -> int:\n \"\"\"\n\tWrite a python function to find the sum of the largest and smallest value in a given array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_476_big_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "big_sum", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == 4\n assert candidate([-1, 2, 3, 4]) == 3\n assert candidate([2, 3, 6]) == 8\n\ndef test_check():\n check(big_sum)\n\ntest_check()\n"}
{"name": "mbpp_465_drop_empty", "language": "py", "prompt": "from typing import Dict, Optional\n\ndef drop_empty(dict1: Dict[str, Optional[str]]) -> Dict[str, str]:\n \"\"\"\n\tWrite a function to drop empty items from a given dictionary.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_465_drop_empty.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "drop_empty", "test": "def check(candidate):\n assert candidate({ 'c1': 'Red', 'c2': 'Green', 'c3': None }) == { 'c1': 'Red', 'c2': 'Green' }\n assert candidate({ 'c1': 'Red', 'c2': None, 'c3': None }) == { 'c1': 'Red' }\n assert candidate({ 'c1': None, 'c2': 'Green', 'c3': None }) == { 'c2': 'Green' }\n\ndef test_check():\n check(drop_empty)\n\ntest_check()\n"}
{"name": "mbpp_454_text_match_wordz", "language": "py", "prompt": "def text_match_wordz(text: str) -> bool:\n \"\"\"\n\tWrite a function that matches a word containing 'z'.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_454_text_match_wordz.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "text_match_wordz", "test": "def check(candidate):\n assert candidate('pythonz.') == True\n assert candidate('xyz.') == True\n assert candidate(' lang .') == False\n\ndef test_check():\n check(text_match_wordz)\n\ntest_check()\n"}
{"name": "mbpp_605_prime_num", "language": "py", "prompt": "def prime_num(num: int) -> bool:\n \"\"\"\n\tWrite a function to check if the given integer is a prime number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_605_prime_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "prime_num", "test": "def check(candidate):\n assert candidate(13) == True\n assert candidate(7) == True\n assert candidate(-1010) == False\n\ndef test_check():\n check(prime_num)\n\ntest_check()\n"}
{"name": "mbpp_108_merge_sorted_list", "language": "py", "prompt": "from typing import List\n\ndef merge_sorted_list(num1: List[int], num2: List[int], num3: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to merge three lists into a single sorted list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_108_merge_sorted_list.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "merge_sorted_list", "test": "def check(candidate):\n assert candidate([25, 24, 15, 4, 5, 29, 110], [19, 20, 11, 56, 25, 233, 154], [24, 26, 54, 48]) == [4, 5, 11, 15, 19, 20, 24, 24, 25, 25, 26, 29, 48, 54, 56, 110, 154, 233]\n assert candidate([1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]) == [1, 1, 2, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 11, 12]\n assert candidate([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1], [25, 35, 22, 85, 14, 65, 75, 25, 58], [12, 74, 9, 50, 61, 41]) == [1, 2, 3, 4, 7, 8, 9, 9, 9, 10, 12, 14, 14, 18, 22, 25, 25, 35, 41, 50, 58, 61, 65, 74, 75, 85]\n\ndef test_check():\n check(merge_sorted_list)\n\ntest_check()\n"}
{"name": "mbpp_639_sample_nam", "language": "py", "prompt": "from typing import List\n\ndef sample_nam(sample_names: List[str]) -> int:\n \"\"\"\n\tWrite a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_639_sample_nam.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sample_nam", "test": "def check(candidate):\n assert candidate(['sally', 'Dylan', 'rebecca', 'Diana', 'Joanne', 'keith']) == 16\n assert candidate(['php', 'res', 'Python', 'abcd', 'Java', 'aaa']) == 10\n assert candidate(['abcd', 'Python', 'abba', 'aba']) == 6\n\ndef test_check():\n check(sample_nam)\n\ntest_check()\n"}
{"name": "mbpp_409_min_product_tuple", "language": "py", "prompt": "from typing import List, Tuple\n\ndef min_product_tuple(list1: List[Tuple[int, int]]) -> int:\n \"\"\"\n\tWrite a function to find the minimum product from the pairs of tuples within a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_409_min_product_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_product_tuple", "test": "def check(candidate):\n assert candidate([(2, 7), (2, 6), (1, 8), (4, 9)]) == 8\n assert candidate([(10, 20), (15, 2), (5, 10)]) == 30\n assert candidate([(11, 44), (10, 15), (20, 5), (12, 9)]) == 100\n\ndef test_check():\n check(min_product_tuple)\n\ntest_check()\n"}
{"name": "mbpp_791_remove_nested", "language": "py", "prompt": "from typing import Any, Tuple\n\ndef remove_nested(test_tup: Any) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function to remove tuples from the given tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_791_remove_nested.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "remove_nested", "test": "def check(candidate):\n assert candidate((1, 5, 7, (4, 6), 10)) == (1, 5, 7, 10)\n assert candidate((2, 6, 8, (5, 7), 11)) == (2, 6, 8, 11)\n assert candidate((3, 7, 9, (6, 8), 12)) == (3, 7, 9, 12)\n assert candidate((3, 7, 9, (6, 8), (5, 12), 12)) == (3, 7, 9, 12)\n\ndef test_check():\n check(remove_nested)\n\ntest_check()\n"}
{"name": "mbpp_591_swap_List", "language": "py", "prompt": "from typing import List\n\ndef swap_List(newList: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to interchange the first and last elements in a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_591_swap_List.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "swap_List", "test": "def check(candidate):\n assert candidate([12, 35, 9, 56, 24]) == [24, 35, 9, 56, 12]\n assert candidate([1, 2, 3]) == [3, 2, 1]\n assert candidate([4, 5, 6]) == [6, 5, 4]\n\ndef test_check():\n check(swap_List)\n\ntest_check()\n"}
{"name": "mbpp_419_round_and_sum", "language": "py", "prompt": "from typing import List, Union\n\ndef round_and_sum(list1: List[Union[float, int]]) -> int:\n \"\"\"\n\tWrite a function to round every number of a given list of numbers and print the total sum multiplied by the length of the list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_419_round_and_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "round_and_sum", "test": "def check(candidate):\n assert candidate([22.4, 4.0, -16.22, -9.1, 11.0, -12.22, 14.2, -5.2, 17.5]) == 243\n assert candidate([5, 2, 9, 24.3, 29]) == 345\n assert candidate([25.0, 56.7, 89.2]) == 513\n\ndef test_check():\n check(round_and_sum)\n\ntest_check()\n"}
{"name": "mbpp_84_sequence", "language": "py", "prompt": "def sequence(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth number in the newman conway sequence.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_84_sequence.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sequence", "test": "def check(candidate):\n assert candidate(10) == 6\n assert candidate(2) == 1\n assert candidate(3) == 2\n\ndef test_check():\n check(sequence)\n\ntest_check()\n"}
{"name": "mbpp_260_newman_prime", "language": "py", "prompt": "def newman_prime(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth newmanshankswilliams prime number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_260_newman_prime.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "newman_prime", "test": "def check(candidate):\n assert candidate(3) == 7\n assert candidate(4) == 17\n assert candidate(5) == 41\n\ndef test_check():\n check(newman_prime)\n\ntest_check()\n"}
{"name": "mbpp_418_Find_Max", "language": "py", "prompt": "from typing import List, Any\n\ndef Find_Max(lst: List[List[Any]]) -> List[Any]:\n \"\"\"\n\tWrite a python function to find the element of a list having maximum length.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_418_Find_Max.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Find_Max", "test": "def check(candidate):\n assert candidate([['A'], ['A', 'B'], ['A', 'B', 'C']]) == ['A', 'B', 'C']\n assert candidate([[1], [1, 2], [1, 2, 3]]) == [1, 2, 3]\n assert candidate([[1, 1], [1, 2, 3], [1, 5, 6, 1]]) == [1, 5, 6, 1]\n\ndef test_check():\n check(Find_Max)\n\ntest_check()\n"}
{"name": "mbpp_565_split", "language": "py", "prompt": "from typing import List\n\ndef split(word: str) -> List[str]:\n \"\"\"\n\tWrite a python function to split a string into characters.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_565_split.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "split", "test": "def check(candidate):\n assert candidate('python') == ['p', 'y', 't', 'h', 'o', 'n']\n assert candidate('Name') == ['N', 'a', 'm', 'e']\n assert candidate('program') == ['p', 'r', 'o', 'g', 'r', 'a', 'm']\n\ndef test_check():\n check(split)\n\ntest_check()\n"}
{"name": "mbpp_778_pack_consecutive_duplicates", "language": "py", "prompt": "from typing import List, Any\n\ndef pack_consecutive_duplicates(list1: List[Any]) -> List[List[Any]]:\n \"\"\"\n\tWrite a function to pack consecutive duplicates of a given list elements into sublists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_778_pack_consecutive_duplicates.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "pack_consecutive_duplicates", "test": "def check(candidate):\n assert candidate([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]) == [[0, 0], [1], [2], [3], [4, 4], [5], [6, 6, 6], [7], [8], [9], [4, 4]]\n assert candidate([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10]) == [[10, 10], [15], [19], [18, 18], [17], [26, 26], [17], [18], [10]]\n assert candidate(['a', 'a', 'b', 'c', 'd', 'd']) == [['a', 'a'], ['b'], ['c'], ['d', 'd']]\n\ndef test_check():\n check(pack_consecutive_duplicates)\n\ntest_check()\n"}
{"name": "mbpp_753_min_k", "language": "py", "prompt": "from typing import List, Tuple\n\ndef min_k(test_list: List[Tuple[str, int]], K: int) -> List[Tuple[str, int]]:\n \"\"\"\n\tWrite a function to find minimum k records from tuple list. https://www.geeksforgeeks.org/python-find-minimum-k-records-from-tuple-list/ - in this case a verbatim copy of test cases\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_753_min_k.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "min_k", "test": "def check(candidate):\n assert candidate([('Manjeet', 10), ('Akshat', 4), ('Akash', 2), ('Nikhil', 8)], 2) == [('Akash', 2), ('Akshat', 4)]\n assert candidate([('Sanjeev', 11), ('Angat', 5), ('Akash', 3), ('Nepin', 9)], 3) == [('Akash', 3), ('Angat', 5), ('Nepin', 9)]\n assert candidate([('tanmay', 14), ('Amer', 11), ('Ayesha', 9), ('SKD', 16)], 1) == [('Ayesha', 9)]\n\ndef test_check():\n check(min_k)\n\ntest_check()\n"}
{"name": "mbpp_113_check_integer", "language": "py", "prompt": "def check_integer(text: str) -> bool:\n \"\"\"\n\tWrite a function to check if a string represents an integer or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_113_check_integer.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_integer", "test": "def check(candidate):\n assert candidate('python') == False\n assert candidate('1') == True\n assert candidate('12345') == True\n\ndef test_check():\n check(check_integer)\n\ntest_check()\n"}
{"name": "mbpp_743_rotate_right", "language": "py", "prompt": "from typing import List\n\ndef rotate_right(list: List[int], m: int) -> List[int]:\n \"\"\"\n\tWrite a function to rotate a given list by specified number of items to the right direction. https://www.geeksforgeeks.org/python-program-right-rotate-list-n/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_743_rotate_right.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "rotate_right", "test": "def check(candidate):\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3) == [8, 9, 10, 1, 2, 3, 4, 5, 6, 7]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2) == [9, 10, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 5) == [6, 7, 8, 9, 10, 1, 2, 3, 4, 5]\n\ndef test_check():\n check(rotate_right)\n\ntest_check()\n"}
{"name": "mbpp_598_armstrong_number", "language": "py", "prompt": "def armstrong_number(number: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given number is armstrong or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_598_armstrong_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "armstrong_number", "test": "def check(candidate):\n assert candidate(153) == True\n assert candidate(259) == False\n assert candidate(4458) == False\n\ndef test_check():\n check(armstrong_number)\n\ntest_check()\n"}
{"name": "mbpp_398_sum_of_digits", "language": "py", "prompt": "from typing import List, Any\n\ndef sum_of_digits(nums: List[Any]) -> int:\n \"\"\"\n\tWrite a function to compute the sum of digits of each number of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_398_sum_of_digits.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_of_digits", "test": "def check(candidate):\n assert candidate([10, 2, 56]) == 14\n assert candidate([[10, 20, 4, 5, 'b', 70, 'a']]) == 19\n assert candidate([10, 20, -4, 5, -70]) == 19\n\ndef test_check():\n check(sum_of_digits)\n\ntest_check()\n"}
{"name": "mbpp_229_re_arrange_array", "language": "py", "prompt": "from typing import List\n\ndef re_arrange_array(arr: List[int], n: int) -> List[int]:\n \"\"\"\n\tWrite a function that takes in an array and an integer n, and re-arranges the first n elements of the given array so that all negative elements appear before positive ones, and where the relative order among negative and positive elements is preserved.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_229_re_arrange_array.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "re_arrange_array", "test": "def check(candidate):\n assert candidate([-1, 2, -3, 4, 5, 6, -7, 8, 9], 9) == [-1, -3, -7, 4, 5, 6, 2, 8, 9]\n assert candidate([12, -14, -26, 13, 15], 5) == [-14, -26, 12, 13, 15]\n assert candidate([10, 24, 36, -42, -39, -78, 85], 7) == [-42, -39, -78, 10, 24, 36, 85]\n\ndef test_check():\n check(re_arrange_array)\n\ntest_check()\n"}
{"name": "mbpp_638_wind_chill", "language": "py", "prompt": "def wind_chill(v: int, t: int) -> int:\n \"\"\"\n\tWrite a function to calculate the wind chill index rounded to the next integer given the wind velocity in km/h and a temperature in celsius.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_638_wind_chill.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "wind_chill", "test": "def check(candidate):\n assert candidate(120, 35) == 40\n assert candidate(40, 20) == 19\n assert candidate(10, 8) == 6\n\ndef test_check():\n check(wind_chill)\n\ntest_check()\n"}
{"name": "mbpp_608_bell_Number", "language": "py", "prompt": "def bell_Number(n: int) -> int:\n \"\"\"\n\tWrite a python function to find nth bell number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_608_bell_Number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "bell_Number", "test": "def check(candidate):\n assert candidate(2) == 2\n assert candidate(3) == 5\n assert candidate(4) == 15\n\ndef test_check():\n check(bell_Number)\n\ntest_check()\n"}
{"name": "mbpp_295_sum_div", "language": "py", "prompt": "def sum_div(number: int) -> int:\n \"\"\"\n\tWrite a function to return the sum of all divisors of a number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_295_sum_div.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sum_div", "test": "def check(candidate):\n assert candidate(8) == 7\n assert candidate(12) == 16\n assert candidate(7) == 1\n\ndef test_check():\n check(sum_div)\n\ntest_check()\n"}
{"name": "mbpp_630_get_coordinates", "language": "py", "prompt": "from typing import Tuple, List\n\ndef get_coordinates(test_tup: Tuple[int, int]) -> List[List[int]]:\n \"\"\"\n\tWrite a function to extract all the adjacent coordinates of the given coordinate tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_630_get_coordinates.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_coordinates", "test": "def check(candidate):\n assert candidate((3, 4)) == [[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]]\n assert candidate((4, 5)) == [[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]]\n assert candidate((5, 6)) == [[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7]]\n\ndef test_check():\n check(get_coordinates)\n\ntest_check()\n"}
{"name": "mbpp_579_find_dissimilar", "language": "py", "prompt": "from typing import Tuple\n\ndef find_dissimilar(test_tup1: Tuple[int, int, int, int], test_tup2: Tuple[int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function to find the dissimilar elements in the given two tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_579_find_dissimilar.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_dissimilar", "test": "def check(candidate):\n assert candidate((3, 4, 5, 6), (5, 7, 4, 10)) == (3, 6, 7, 10)\n assert candidate((1, 2, 3, 4), (7, 2, 3, 9)) == (1, 4, 7, 9)\n assert candidate((21, 11, 25, 26), (26, 34, 21, 36)) == (34, 36, 11, 25)\n\ndef test_check():\n check(find_dissimilar)\n\ntest_check()\n"}
{"name": "mbpp_125_find_length", "language": "py", "prompt": "def find_length(string: str) -> int:\n \"\"\"\n\tWrite a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_125_find_length.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_length", "test": "def check(candidate):\n assert candidate('11000010001') == 6\n assert candidate('10111') == 1\n assert candidate('11011101100101') == 2\n\ndef test_check():\n check(find_length)\n\ntest_check()\n"}
{"name": "mbpp_262_split_two_parts", "language": "py", "prompt": "from typing import List, Any\n\ndef split_two_parts(list1: List[Any], L: int) -> Any:\n \"\"\"\n\tWrite a function that takes in a list and an integer L and splits the given list into two parts where the length of the first part of the list is L, and returns the resulting lists in a tuple.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_262_split_two_parts.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "split_two_parts", "test": "def check(candidate):\n assert candidate([1, 1, 2, 3, 4, 4, 5, 1], 3) == ([1, 1, 2], [3, 4, 4, 5, 1])\n assert candidate(['a', 'b', 'c', 'd'], 2) == (['a', 'b'], ['c', 'd'])\n assert candidate(['p', 'y', 't', 'h', 'o', 'n'], 4) == (['p', 'y', 't', 'h'], ['o', 'n'])\n\ndef test_check():\n check(split_two_parts)\n\ntest_check()\n"}
{"name": "mbpp_771_check_expression", "language": "py", "prompt": "def check_expression(exp: str) -> bool:\n \"\"\"\n\tWrite a function to check if the given expression is balanced or not. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_771_check_expression.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_expression", "test": "def check(candidate):\n assert candidate('{()}[{}]') == True\n assert candidate('{()}[{]') == False\n assert candidate('{()}[{}][]({})') == True\n\ndef test_check():\n check(check_expression)\n\ntest_check()\n"}
{"name": "mbpp_801_test_three_equal", "language": "py", "prompt": "def test_three_equal(x: int, y: int, z: int) -> int:\n \"\"\"\n\tWrite a python function to count the number of equal numbers from three given integers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_801_test_three_equal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "test_three_equal", "test": "def check(candidate):\n assert candidate(1, 1, 1) == 3\n assert candidate(-1, -2, -3) == 0\n assert candidate(1, 2, 2) == 2\n\ndef test_check():\n check(test_three_equal)\n\ntest_check()\n"}
{"name": "mbpp_389_find_lucas", "language": "py", "prompt": "def find_lucas(n: int) -> int:\n \"\"\"\n\tWrite a function to find the n'th lucas number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_389_find_lucas.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_lucas", "test": "def check(candidate):\n assert candidate(9) == 76\n assert candidate(4) == 7\n assert candidate(3) == 4\n\ndef test_check():\n check(find_lucas)\n\ntest_check()\n"}
{"name": "mbpp_102_snake_to_camel", "language": "py", "prompt": "def snake_to_camel(word: str) -> str:\n \"\"\"\n\tWrite a function to convert a snake case string to camel case string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_102_snake_to_camel.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "snake_to_camel", "test": "def check(candidate):\n assert candidate('python_program') == 'PythonProgram'\n assert candidate('python_language') == 'PythonLanguage'\n assert candidate('programming_language') == 'ProgrammingLanguage'\n\ndef test_check():\n check(snake_to_camel)\n\ntest_check()\n"}
{"name": "mbpp_604_reverse_words", "language": "py", "prompt": "def reverse_words(s: str) -> str:\n \"\"\"\n\tWrite a function to reverse words seperated by spaces in a given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_604_reverse_words.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "reverse_words", "test": "def check(candidate):\n assert candidate('python program') == 'program python'\n assert candidate('java language') == 'language java'\n assert candidate('indian man') == 'man indian'\n\ndef test_check():\n check(reverse_words)\n\ntest_check()\n"}
{"name": "mbpp_624_is_upper", "language": "py", "prompt": "def is_upper(string: str) -> str:\n \"\"\"\n\tWrite a python function to convert a given string to uppercase.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_624_is_upper.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_upper", "test": "def check(candidate):\n assert candidate('person') == 'PERSON'\n assert candidate('final') == 'FINAL'\n assert candidate('Valid') == 'VALID'\n\ndef test_check():\n check(is_upper)\n\ntest_check()\n"}
{"name": "mbpp_558_digit_distance_nums", "language": "py", "prompt": "def digit_distance_nums(n1: int, n2: int) -> int:\n \"\"\"\n\tWrite a python function to find the sum of the per-digit difference between two integers.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_558_digit_distance_nums.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "digit_distance_nums", "test": "def check(candidate):\n assert candidate(1, 2) == 1\n assert candidate(23, 56) == 6\n assert candidate(123, 256) == 7\n\ndef test_check():\n check(digit_distance_nums)\n\ntest_check()\n"}
{"name": "mbpp_143_find_lists", "language": "py", "prompt": "from typing import List, Any\n\ndef find_lists(Input: List[Any]) -> int:\n \"\"\"\n\tWrite a function to find number of lists present in the given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_143_find_lists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_lists", "test": "def check(candidate):\n assert candidate([[1, 2, 3, 4], [5, 6, 7, 8]]) == 2\n assert candidate([[1, 2], [3, 4], [5, 6]]) == 3\n assert candidate([9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n\ndef test_check():\n check(find_lists)\n\ntest_check()\n"}
{"name": "mbpp_615_average_tuple", "language": "py", "prompt": "from typing import List\n\ndef average_tuple(nums: List[List[int]]) -> List[float]:\n \"\"\"\n\tWrite a function which takes a lists of lists and returns the average value for each sublist as a list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_615_average_tuple.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "average_tuple", "test": "def check(candidate):\n assert candidate([[10, 10, 10, 12], [30, 45, 56, 45], [81, 80, 39, 32], [1, 2, 3, 4]]) == [30.5, 34.25, 27.0, 23.25]\n assert candidate([[1, 1, -5], [30, -15, 56], [81, -60, -39], [-10, 2, 3]]) == [25.5, -18.0, 3.75]\n assert candidate([[100, 100, 100, 120], [300, 450, 560, 450], [810, 800, 390, 320], [10, 20, 30, 40]]) == [305.0, 342.5, 270.0, 232.5]\n\ndef test_check():\n check(average_tuple)\n\ntest_check()\n"}
{"name": "mbpp_166_find_even_pair", "language": "py", "prompt": "from typing import List\n\ndef find_even_pair(A: List[int]) -> int:\n \"\"\"\n\tWrite a function that counts the number of pairs of integers in a list that xor to an even number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_166_find_even_pair.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_even_pair", "test": "def check(candidate):\n assert candidate([5, 4, 7, 2, 1]) == 4\n assert candidate([7, 2, 8, 1, 0, 5, 11]) == 9\n assert candidate([1, 2, 3]) == 1\n\ndef test_check():\n check(find_even_pair)\n\ntest_check()\n"}
{"name": "mbpp_58_opposite_Signs", "language": "py", "prompt": "def opposite_Signs(x: int, y: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the given two integers have opposite sign or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_58_opposite_Signs.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "opposite_Signs", "test": "def check(candidate):\n assert candidate(1, -2) == True\n assert candidate(3, 2) == False\n assert candidate(-10, -10) == False\n assert candidate(-2, 2) == True\n\ndef test_check():\n check(opposite_Signs)\n\ntest_check()\n"}
{"name": "mbpp_569_sort_sublists", "language": "py", "prompt": "from typing import List\n\ndef sort_sublists(list1: List[List[str]]) -> List[List[str]]:\n \"\"\"\n\tWrite a function to sort each sublist of strings in a given list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_569_sort_sublists.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "sort_sublists", "test": "def check(candidate):\n assert candidate([['green', 'orange'], ['black', 'white'], ['white', 'black', 'orange']]) == [['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']]\n assert candidate([['green', 'orange'], ['black'], ['green', 'orange'], ['white']]) == [['green', 'orange'], ['black'], ['green', 'orange'], ['white']]\n assert candidate([['a', 'b'], ['d', 'c'], ['g', 'h'], ['f', 'e']]) == [['a', 'b'], ['c', 'd'], ['g', 'h'], ['e', 'f']]\n\ndef test_check():\n check(sort_sublists)\n\ntest_check()\n"}
{"name": "mbpp_255_combinations_colors", "language": "py", "prompt": "from typing import List\n\ndef combinations_colors(l: List[str], n: int) -> List[List[str]]:\n \"\"\"\n\tWrite a function that takes in a list and length n, and generates all combinations (with repetition) of the elements of the list and returns a list with a list for each combination.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_255_combinations_colors.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "combinations_colors", "test": "def check(candidate):\n assert candidate(['Red', 'Green', 'Blue'], 1) == [['Red'], ['Green'], ['Blue']]\n assert candidate(['Red', 'Green', 'Blue'], 2) == [['Red', 'Red'], ['Red', 'Green'], ['Red', 'Blue'], ['Green', 'Green'], ['Green', 'Blue'], ['Blue', 'Blue']]\n assert candidate(['Red', 'Green', 'Blue'], 3) == [['Red', 'Red', 'Red'], ['Red', 'Red', 'Green'], ['Red', 'Red', 'Blue'], ['Red', 'Green', 'Green'], ['Red', 'Green', 'Blue'], ['Red', 'Blue', 'Blue'], ['Green', 'Green', 'Green'], ['Green', 'Green', 'Blue'], ['Green', 'Blue', 'Blue'], ['Blue', 'Blue', 'Blue']]\n\ndef test_check():\n check(combinations_colors)\n\ntest_check()\n"}
{"name": "mbpp_619_move_num", "language": "py", "prompt": "def move_num(test_str: str) -> str:\n \"\"\"\n\tWrite a function to move all the numbers to the end of the given string.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_619_move_num.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "move_num", "test": "def check(candidate):\n assert candidate('I1love143you55three3000thousand') == 'Iloveyouthreethousand1143553000'\n assert candidate('Avengers124Assemble') == 'AvengersAssemble124'\n assert candidate('Its11our12path13to14see15things16do17things') == 'Itsourpathtoseethingsdothings11121314151617'\n\ndef test_check():\n check(move_num)\n\ntest_check()\n"}
{"name": "mbpp_249_intersection_array", "language": "py", "prompt": "from typing import List\n\ndef intersection_array(array_nums1: List[int], array_nums2: List[int]) -> List[int]:\n \"\"\"\n\tWrite a function to find the intersection of two arrays.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_249_intersection_array.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "intersection_array", "test": "def check(candidate):\n assert candidate([1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 4, 8, 9]) == [1, 2, 8, 9]\n assert candidate([1, 2, 3, 5, 7, 8, 9, 10], [3, 5, 7, 9]) == [3, 5, 7, 9]\n assert candidate([1, 2, 3, 5, 7, 8, 9, 10], [10, 20, 30, 40]) == [10]\n\ndef test_check():\n check(intersection_array)\n\ntest_check()\n"}
{"name": "mbpp_250_count_X", "language": "py", "prompt": "from typing import List\n\ndef count_X(tup: List[int], x: int) -> int:\n \"\"\"\n\tWrite a python function that takes in a tuple and an element and counts the occcurences of the element in the list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_250_count_X.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "count_X", "test": "def check(candidate):\n assert candidate([10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 4) == 0\n assert candidate([10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 10) == 3\n assert candidate([10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2], 8) == 4\n\ndef test_check():\n check(count_X)\n\ntest_check()\n"}
{"name": "mbpp_622_get_median", "language": "py", "prompt": "from typing import List\n\ndef get_median(arr1: List[int], arr2: List[int], n: int) -> float:\n \"\"\"\n\tWrite a function to find the median of two sorted lists of same size.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_622_get_median.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_median", "test": "def check(candidate):\n assert candidate([1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5) == 16.0\n assert candidate([2, 4, 8, 9], [7, 13, 19, 28], 4) == 8.5\n assert candidate([3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6) == 25.0\n\ndef test_check():\n check(get_median)\n\ntest_check()\n"}
{"name": "mbpp_80_tetrahedral_number", "language": "py", "prompt": "def tetrahedral_number(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth tetrahedral number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_80_tetrahedral_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "tetrahedral_number", "test": "def check(candidate):\n assert candidate(5) == 35\n assert candidate(6) == 56\n assert candidate(7) == 84\n\ndef test_check():\n check(tetrahedral_number)\n\ntest_check()\n"}
{"name": "mbpp_780_find_combinations", "language": "py", "prompt": "from typing import List, Tuple\n\ndef find_combinations(test_list: List[Tuple[int, int]]) -> List[Tuple[int, int]]:\n \"\"\"\n\tWrite a function to find the combinations of sums with tuples in the given tuple list. https://www.geeksforgeeks.org/python-combinations-of-sum-with-tuples-in-tuple-list/\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_780_find_combinations.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_combinations", "test": "def check(candidate):\n assert candidate([(2, 4), (6, 7), (5, 1), (6, 10)]) == [(8, 11), (7, 5), (8, 14), (11, 8), (12, 17), (11, 11)]\n assert candidate([(3, 5), (7, 8), (6, 2), (7, 11)]) == [(10, 13), (9, 7), (10, 16), (13, 10), (14, 19), (13, 13)]\n assert candidate([(4, 6), (8, 9), (7, 3), (8, 12)]) == [(12, 15), (11, 9), (12, 18), (15, 12), (16, 21), (15, 15)]\n\ndef test_check():\n check(find_combinations)\n\ntest_check()\n"}
{"name": "mbpp_733_find_first_occurrence", "language": "py", "prompt": "from typing import List\n\ndef find_first_occurrence(A: List[int], x: int) -> int:\n \"\"\"\n\tWrite a function to find the index of the first occurrence of a given number in a sorted array.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_733_find_first_occurrence.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "find_first_occurrence", "test": "def check(candidate):\n assert candidate([2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 1\n assert candidate([2, 3, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 2\n assert candidate([2, 4, 1, 5, 6, 6, 8, 9, 9, 9], 6) == 4\n\ndef test_check():\n check(find_first_occurrence)\n\ntest_check()\n"}
{"name": "mbpp_6_differ_At_One_Bit_Pos", "language": "py", "prompt": "def differ_At_One_Bit_Pos(a: int, b: int) -> bool:\n \"\"\"\n\tWrite a python function to check whether the two numbers differ at one bit position only or not.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_6_differ_At_One_Bit_Pos.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "differ_At_One_Bit_Pos", "test": "def check(candidate):\n assert candidate(13, 9) == True\n assert candidate(15, 8) == False\n assert candidate(2, 4) == False\n assert candidate(2, 3) == True\n assert candidate(5, 1) == True\n assert candidate(1, 5) == True\n\ndef test_check():\n check(differ_At_One_Bit_Pos)\n\ntest_check()\n"}
{"name": "mbpp_762_check_monthnumber_number", "language": "py", "prompt": "def check_monthnumber_number(monthnum3: int) -> bool:\n \"\"\"\n\tWrite a function to check whether the given month number contains 30 days or not. Months are given as number from 1 to 12.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_762_check_monthnumber_number.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "check_monthnumber_number", "test": "def check(candidate):\n assert candidate(6) == True\n assert candidate(2) == False\n assert candidate(12) == False\n\ndef test_check():\n check(check_monthnumber_number)\n\ntest_check()\n"}
{"name": "mbpp_625_swap_List", "language": "py", "prompt": "from typing import List\n\ndef swap_List(newList: List[int]) -> List[int]:\n \"\"\"\n\tWrite a python function to interchange the first and last element in a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_625_swap_List.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "swap_List", "test": "def check(candidate):\n assert candidate([1, 2, 3]) == [3, 2, 1]\n assert candidate([1, 2, 3, 4, 4]) == [4, 2, 3, 4, 1]\n assert candidate([4, 5, 6]) == [6, 5, 4]\n\ndef test_check():\n check(swap_List)\n\ntest_check()\n"}
{"name": "mbpp_407_rearrange_bigger", "language": "py", "prompt": "from typing import Any\n\ndef rearrange_bigger(n: int) -> Any:\n \"\"\"\n\tWrite a function to create the next bigger number by rearranging the digits of a given number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_407_rearrange_bigger.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "rearrange_bigger", "test": "def check(candidate):\n assert candidate(12) == 21\n assert candidate(10) == False\n assert candidate(102) == 120\n\ndef test_check():\n check(rearrange_bigger)\n\ntest_check()\n"}
{"name": "mbpp_392_get_max_sum", "language": "py", "prompt": "def get_max_sum(n: int) -> int:\n \"\"\"\n\tWrite a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_392_get_max_sum.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "get_max_sum", "test": "def check(candidate):\n assert candidate(60) == 106\n assert candidate(10) == 12\n assert candidate(2) == 2\n\ndef test_check():\n check(get_max_sum)\n\ntest_check()\n"}
{"name": "mbpp_784_mul_even_odd", "language": "py", "prompt": "from typing import List\n\ndef mul_even_odd(list1: List[int]) -> int:\n \"\"\"\n\tWrite a function to find the product of first even and odd number of a given list.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_784_mul_even_odd.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "mul_even_odd", "test": "def check(candidate):\n assert candidate([1, 3, 5, 7, 4, 1, 6, 8]) == 4\n assert candidate([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate([1, 5, 7, 9, 10]) == 10\n\ndef test_check():\n check(mul_even_odd)\n\ntest_check()\n"}
{"name": "mbpp_109_odd_Equivalent", "language": "py", "prompt": "def odd_Equivalent(s: str, n: int) -> int:\n \"\"\"\n\tWrite a python function to find the number of numbers with an odd value when rotating a binary string the given number of times.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_109_odd_Equivalent.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "odd_Equivalent", "test": "def check(candidate):\n assert candidate('011001', 6) == 3\n assert candidate('11011', 5) == 4\n assert candidate('1010', 4) == 2\n\ndef test_check():\n check(odd_Equivalent)\n\ntest_check()\n"}
{"name": "mbpp_95_Find_Min_Length", "language": "py", "prompt": "from typing import List\n\ndef Find_Min_Length(lst: List[List[int]]) -> int:\n \"\"\"\n\tWrite a python function to find the length of the smallest list in a list of lists.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_95_Find_Min_Length.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "Find_Min_Length", "test": "def check(candidate):\n assert candidate([[1], [1, 2]]) == 1\n assert candidate([[1, 2], [1, 2, 3], [1, 2, 3, 4]]) == 2\n assert candidate([[3, 3, 3], [4, 4, 4, 4]]) == 3\n\ndef test_check():\n check(Find_Min_Length)\n\ntest_check()\n"}
{"name": "mbpp_399_bitwise_xor", "language": "py", "prompt": "from typing import Tuple\n\ndef bitwise_xor(test_tup1: Tuple[int, int, int, int], test_tup2: Tuple[int, int, int, int]) -> Tuple[int, int, int, int]:\n \"\"\"\n\tWrite a function to perform the mathematical bitwise xor operation across the given tuples.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_399_bitwise_xor.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "bitwise_xor", "test": "def check(candidate):\n assert candidate((10, 4, 6, 9), (5, 2, 3, 3)) == (15, 6, 5, 10)\n assert candidate((11, 5, 7, 10), (6, 3, 4, 4)) == (13, 6, 3, 14)\n assert candidate((12, 6, 8, 11), (7, 4, 5, 6)) == (11, 2, 13, 13)\n\ndef test_check():\n check(bitwise_xor)\n\ntest_check()\n"}
{"name": "mbpp_641_is_nonagonal", "language": "py", "prompt": "def is_nonagonal(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth nonagonal number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_641_is_nonagonal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_nonagonal", "test": "def check(candidate):\n assert candidate(10) == 325\n assert candidate(15) == 750\n assert candidate(18) == 1089\n\ndef test_check():\n check(is_nonagonal)\n\ntest_check()\n"}
{"name": "mbpp_59_is_octagonal", "language": "py", "prompt": "def is_octagonal(n: int) -> int:\n \"\"\"\n\tWrite a function to find the nth octagonal number.\n\t\"\"\"\n", "doctests": "transform", "original": "/home/arjun/repos/MultiPL-E/datasets/../datasets/mbpp-typed/mbpp_59_is_octagonal.py", "prompt_terminology": "reworded", "stop_tokens": ["\ndef", "\n#", "\nif", "\nclass"], "entry_point": "is_octagonal", "test": "def check(candidate):\n assert candidate(5) == 65\n assert candidate(10) == 280\n assert candidate(15) == 645\n\ndef test_check():\n check(is_octagonal)\n\ntest_check()\n"}