data_source stringclasses 1
value | prompt listlengths 1 1 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the first repeated character in a given string.\ndef first_repeated_char(str1):\n\t\nUse Call-... | code | {
"ground_truth": "{\"fn_name\": \"first_repeated_char\", \"inputs\": [[\"abcabc\"], [\"abc\"], [\"123123\"]], \"outputs\": [\"a\", \"None\", \"1\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "first_repeated_char",
"index": 0,
"n_tests": 3,
"problem_id": "mbpp_602",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to get a lucid number smaller than or equal to n.\ndef get_ludic(n):\n\t\nUse Call-Based format\nANSWER:\n",
... | code | {
"ground_truth": "{\"fn_name\": \"get_ludic\", \"inputs\": [[10], [25], [45]], \"outputs\": [[[1, 2, 3, 5, 7]], [[1, 2, 3, 5, 7, 11, 13, 17, 23, 25]], [[1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "get_ludic",
"index": 1,
"n_tests": 3,
"problem_id": "mbpp_603",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to reverse words in a given string.\ndef reverse_words(s):\n\t\nUse Call-Based format\nANSWER:\n",
"role"... | code | {
"ground_truth": "{\"fn_name\": \"reverse_words\", \"inputs\": [[\"python program\"], [\"java language\"], [\"indian man\"]], \"outputs\": [\"program python\", \"language java\", \"man indian\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "reverse_words",
"index": 2,
"n_tests": 3,
"problem_id": "mbpp_604",
"prompt_tokens": 90,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check if the given integer is a prime number.\ndef prime_num(num):\n\t\nUse Call-Based format\nANSWER:\n",... | code | {
"ground_truth": "{\"fn_name\": \"prime_num\", \"inputs\": [[13], [7], [-1010]], \"outputs\": [true, true, false]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "prime_num",
"index": 3,
"n_tests": 3,
"problem_id": "mbpp_605",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to convert degrees to radians.\ndef radian_degree(degree):\n\t\nUse Call-Based format\nANSWER:\n",
"role"... | code | {
"ground_truth": "{\"fn_name\": \"radian_degree\", \"inputs\": [[90], [60], [120]], \"outputs\": [1.5707963267948966, 1.0471975511965976, 2.0943951023931953]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "radian_degree",
"index": 4,
"n_tests": 3,
"problem_id": "mbpp_606",
"prompt_tokens": 90,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to search a literals string in a string and also find the location within the original string where the patte... | code | {
"ground_truth": "{\"fn_name\": \"find_literals\", \"inputs\": [[\"The quick brown fox jumps over the lazy dog.\", \"fox\"], [\"Its been a very crazy procedure right\", \"crazy\"], [\"Hardest choices required strongest will\", \"will\"]], \"outputs\": [[[\"fox\", 16, 19]], [[\"crazy\", 16, 21]], [[\"will\", 35, 39]]... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_literals",
"index": 5,
"n_tests": 3,
"problem_id": "mbpp_607",
"prompt_tokens": 109,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find nth bell number.\ndef bell_Number(n):\n\t\nUse Call-Based format\nANSWER:\n",
"role": "use... | code | {
"ground_truth": "{\"fn_name\": \"bell_Number\", \"inputs\": [[2], [3], [4]], \"outputs\": [2, 5, 15]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "bell_Number",
"index": 6,
"n_tests": 3,
"problem_id": "mbpp_608",
"prompt_tokens": 89,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find minimum possible value for the given periodic function.\ndef floor_Min(A, B, N):\n\t\nUse Call... | code | {
"ground_truth": "{\"fn_name\": \"floor_Min\", \"inputs\": [[10, 20, 30], [1, 2, 1], [11, 10, 9]], \"outputs\": [15, 0, 9]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "floor_Min",
"index": 7,
"n_tests": 3,
"problem_id": "mbpp_609",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to remove the k'th element from a given list.\ndef remove_kth_element(list1, L):\n\t\nUse Call-Based f... | code | {
"ground_truth": "{\"fn_name\": \"remove_kth_element\", \"inputs\": [[[1, 1, 2, 3, 4, 4, 5, 1], 3], [[0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4], 4], [[10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10], 5]], \"outputs\": [[[1, 1, 3, 4, 4, 5, 1]], [[0, 0, 1, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4]], [[10, 10, 15, 19, ... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_kth_element",
"index": 8,
"n_tests": 3,
"problem_id": "mbpp_610",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the maximum of nth column from the given tuple list.\ndef max_of_nth(test_list, N):\n\t\nUse Call-Bas... | code | {
"ground_truth": "{\"fn_name\": \"max_of_nth\", \"inputs\": [[[[5, 6, 7], [1, 3, 5], [8, 9, 19]], 2], [[[6, 7, 8], [2, 4, 6], [9, 10, 20]], 1], [[[7, 8, 9], [3, 5, 7], [10, 11, 21]], 1]], \"outputs\": [19, 10, 11]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "max_of_nth",
"index": 9,
"n_tests": 3,
"problem_id": "mbpp_611",
"prompt_tokens": 99,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to merge the first and last elements separately in a list of lists.\ndef merge(lst):\n\t\nUse Call-Bas... | code | {
"ground_truth": "{\"fn_name\": \"merge\", \"inputs\": [[[[\"x\", \"y\"], [\"a\", \"b\"], [\"m\", \"n\"]]], [[[1, 2], [3, 4], [5, 6], [7, 8]]], [[[\"x\", \"y\", \"z\"], [\"a\", \"b\", \"c\"], [\"m\", \"n\", \"o\"]]]], \"outputs\": [[[[\"x\", \"a\", \"m\"], [\"y\", \"b\", \"n\"]]], [[[1, 3, 5, 7], [2, 4, 6, 8]]], [[[... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "merge",
"index": 10,
"n_tests": 3,
"problem_id": "mbpp_612",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the maximum value in record list as tuple attribute in the given tuple list.\ndef maximum_value(test_... | code | {
"ground_truth": "{\"fn_name\": \"maximum_value\", \"inputs\": [[[[\"key1\", [3, 4, 5]], [\"key2\", [1, 4, 2]], [\"key3\", [9, 3]]]], [[[\"key1\", [4, 5, 6]], [\"key2\", [2, 5, 3]], [\"key3\", [10, 4]]]], [[[\"key1\", [5, 6, 7]], [\"key2\", [3, 6, 4]], [\"key3\", [11, 5]]]]], \"outputs\": [[[[\"key1\", 5], [\"key2\"... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "maximum_value",
"index": 11,
"n_tests": 3,
"problem_id": "mbpp_613",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the cumulative sum of all the values that are present in the given tuple list.\ndef cummulative_sum(t... | code | {
"ground_truth": "{\"fn_name\": \"cummulative_sum\", \"inputs\": [[[[1, 3], [5, 6, 7], [2, 6]]], [[[2, 4], [6, 7, 8], [3, 7]]], [[[3, 5], [7, 8, 9], [4, 8]]]], \"outputs\": [30, 37, 44]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "cummulative_sum",
"index": 12,
"n_tests": 3,
"problem_id": "mbpp_614",
"prompt_tokens": 103,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find average value of the numbers in a given tuple of tuples.\ndef average_tuple(nums):\n\t\nUse Call-Base... | code | {
"ground_truth": "{\"fn_name\": \"average_tuple\", \"inputs\": [[[[10, 10, 10, 12], [30, 45, 56, 45], [81, 80, 39, 32], [1, 2, 3, 4]]], [[[1, 1, -5], [30, -15, 56], [81, -60, -39], [-10, 2, 3]]], [[[100, 100, 100, 120], [300, 450, 560, 450], [810, 800, 390, 320], [10, 20, 30, 40]]]], \"outputs\": [[[30.5, 34.25, 27.... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "average_tuple",
"index": 13,
"n_tests": 3,
"problem_id": "mbpp_615",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to perfom the modulo of tuple elements in the given two tuples.\ndef tuple_modulo(test_tup1, test_tup2):\n\t\... | code | {
"ground_truth": "{\"fn_name\": \"tuple_modulo\", \"inputs\": [[[10, 4, 5, 6], [5, 6, 7, 5]], [[11, 5, 6, 7], [6, 7, 8, 6]], [[12, 6, 7, 8], [7, 8, 9, 7]]], \"outputs\": [[[0, 4, 5, 1]], [[5, 5, 6, 1]], [[5, 6, 7, 1]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "tuple_modulo",
"index": 14,
"n_tests": 3,
"problem_id": "mbpp_616",
"prompt_tokens": 105,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite 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... | code | {
"ground_truth": "{\"fn_name\": \"min_Jumps\", \"inputs\": [[3, 4, 11], [3, 4, 0], [11, 14, 11]], \"outputs\": [3.5, 0, 1]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "min_Jumps",
"index": 15,
"n_tests": 3,
"problem_id": "mbpp_617",
"prompt_tokens": 119,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to divide two lists using map and lambda function.\ndef div_list(nums1, nums2):\n\t\nUse Call-Based format\nA... | code | {
"ground_truth": "{\"fn_name\": \"div_list\", \"inputs\": [[[4, 5, 6], [1, 2, 3]], [[3, 2], [1, 4]], [[90, 120], [50, 70]]], \"outputs\": [[[4.0, 2.5, 2.0]], [[3.0, 0.5]], [[1.8, 1.7142857142857142]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "div_list",
"index": 16,
"n_tests": 3,
"problem_id": "mbpp_618",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to move all the numbers in it to the given string.\ndef move_num(test_str):\n\t\nUse Call-Based format\nANSWE... | code | {
"ground_truth": "{\"fn_name\": \"move_num\", \"inputs\": [[\"I1love143you55three3000thousand\"], [\"Avengers124Assemble\"], [\"Its11our12path13to14see15things16do17things\"]], \"outputs\": [\"Iloveyouthreethousand1143553000\", \"AvengersAssemble124\", \"Itsourpathtoseethingsdothings11121314151617\"]}",
"style": "... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "move_num",
"index": 17,
"n_tests": 3,
"problem_id": "mbpp_619",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the largest subset where each pair is divisible.\ndef largest_subset(a, n):\n\t\nUse Call-Based forma... | code | {
"ground_truth": "{\"fn_name\": \"largest_subset\", \"inputs\": [[[1, 3, 6, 13, 17, 18], 6], [[10, 5, 3, 15, 20], 5], [[18, 1, 3, 6, 13, 17], 6]], \"outputs\": [4, 3, 4]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "largest_subset",
"index": 18,
"n_tests": 3,
"problem_id": "mbpp_620",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to increment the numeric values in the given strings by k.\ndef increment_numerics(test_list, K):\n\t\nUse Ca... | code | {
"ground_truth": "{\"fn_name\": \"increment_numerics\", \"inputs\": [[[\"MSM\", \"234\", \"is\", \"98\", \"123\", \"best\", \"4\"], 6], [[\"Dart\", \"356\", \"is\", \"88\", \"169\", \"Super\", \"6\"], 12], [[\"Flutter\", \"451\", \"is\", \"44\", \"96\", \"Magnificent\", \"12\"], 33]], \"outputs\": [[[\"MSM\", \"240\... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "increment_numerics",
"index": 19,
"n_tests": 3,
"problem_id": "mbpp_621",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the median of two sorted arrays of same size.\ndef get_median(arr1, arr2, n):\n\t\nUse Call-Based for... | code | {
"ground_truth": "{\"fn_name\": \"get_median\", \"inputs\": [[[1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5], [[2, 4, 8, 9], [7, 13, 19, 28], 4], [[3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6]], \"outputs\": [16.0, 8.5, 25.0]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "get_median",
"index": 20,
"n_tests": 3,
"problem_id": "mbpp_622",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the n-th power of individual elements in a list using lambda function.\ndef nth_nums(nums, n):\n\t\nU... | code | {
"ground_truth": "{\"fn_name\": \"nth_nums\", \"inputs\": [[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2], [[10, 20, 30], 3], [[12, 15], 5]], \"outputs\": [[[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]], [[1000, 8000, 27000]], [[248832, 759375]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "nth_nums",
"index": 21,
"n_tests": 3,
"problem_id": "mbpp_623",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to convert the given string to upper case.\ndef is_upper(string):\n\t\nUse Call-Based format\nANSWER:\... | code | {
"ground_truth": "{\"fn_name\": \"is_upper\", \"inputs\": [[\"person\"], [\"final\"], [\"Valid\"]], \"outputs\": [\"PERSON\", \"FINAL\", \"VALID\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "is_upper",
"index": 22,
"n_tests": 3,
"problem_id": "mbpp_624",
"prompt_tokens": 92,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to interchange first and last elements in a given list.\ndef swap_List(newList):\n\t\nUse Call-Based f... | code | {
"ground_truth": "{\"fn_name\": \"swap_List\", \"inputs\": [[[1, 2, 3]], [[1, 2, 3, 4, 4]], [[4, 5, 6]]], \"outputs\": [[[3, 2, 1]], [[4, 2, 3, 4, 1]], [[6, 5, 4]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "swap_List",
"index": 23,
"n_tests": 3,
"problem_id": "mbpp_625",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the largest triangle that can be inscribed in the semicircle.\ndef triangle_area(r):\n\t\nUse ... | code | {
"ground_truth": "{\"fn_name\": \"triangle_area\", \"inputs\": [[0], [-1], [2]], \"outputs\": [0, -1, 4]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "triangle_area",
"index": 24,
"n_tests": 3,
"problem_id": "mbpp_626",
"prompt_tokens": 99,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the smallest missing number from the given array.\ndef find_First_Missing(array, start, end):\... | code | {
"ground_truth": "{\"fn_name\": \"find_First_Missing\", \"inputs\": [[[0, 1, 2, 3], 0, 3], [[0, 1, 2, 6, 9], 0, 4], [[2, 3, 5, 8, 9], 0, 4]], \"outputs\": [4, 3, 0]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_First_Missing",
"index": 25,
"n_tests": 3,
"problem_id": "mbpp_627",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to replace all spaces in the given string with character * list item * list item * list item * list item '%20... | code | {
"ground_truth": "{\"fn_name\": \"replace_spaces\", \"inputs\": [[\"My Name is Dawood\"], [\"I am a Programmer\"], [\"I love Coding\"]], \"outputs\": [\"My%20Name%20is%20Dawood\", \"I%20am%20a%20Programmer\", \"I%20love%20Coding\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "replace_spaces",
"index": 26,
"n_tests": 3,
"problem_id": "mbpp_628",
"prompt_tokens": 108,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find even numbers from a mixed list.\ndef Split(list):\n\t\nUse Call-Based format\nANSWER:\n",
... | code | {
"ground_truth": "{\"fn_name\": \"Split\", \"inputs\": [[[1, 2, 3, 4, 5]], [[4, 5, 6, 7, 8, 0, 1]], [[8, 12, 15, 19]]], \"outputs\": [[[2, 4]], [[4, 6, 8, 0]], [[8, 12]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "Split",
"index": 27,
"n_tests": 3,
"problem_id": "mbpp_629",
"prompt_tokens": 91,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to extract all the adjacent coordinates of the given coordinate tuple.\ndef get_coordinates(test_tup):\n\t\nU... | code | {
"ground_truth": "{\"fn_name\": \"get_coordinates\", \"inputs\": [[[3, 4]], [[4, 5]], [[5, 6]]], \"outputs\": [[[[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]]], [[[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]]], [[[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, ... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "get_coordinates",
"index": 28,
"n_tests": 3,
"problem_id": "mbpp_630",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to replace whitespaces with an underscore and vice versa in a given string by using regex.\ndef replace_space... | code | {
"ground_truth": "{\"fn_name\": \"replace_spaces\", \"inputs\": [[\"Jumanji The Jungle\"], [\"The Avengers\"], [\"Fast and Furious\"]], \"outputs\": [\"Jumanji_The_Jungle\", \"The_Avengers\", \"Fast_and_Furious\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "replace_spaces",
"index": 29,
"n_tests": 3,
"problem_id": "mbpp_631",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to move all zeroes to the end of the given list.\ndef move_zero(num_list):\n\t\nUse Call-Based format\... | code | {
"ground_truth": "{\"fn_name\": \"move_zero\", \"inputs\": [[[1, 0, 2, 0, 3, 4]], [[2, 3, 2, 0, 0, 4, 0, 5, 0]], [[0, 1, 0, 1, 1]]], \"outputs\": [[[1, 2, 3, 4, 0, 0]], [[2, 3, 2, 4, 5, 0, 0, 0, 0]], [[1, 1, 1, 0, 0]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "move_zero",
"index": 30,
"n_tests": 3,
"problem_id": "mbpp_632",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the sum of xor of all pairs of numbers in the given array.\ndef pair_OR_Sum(arr, n):\n\t\nUse ... | code | {
"ground_truth": "{\"fn_name\": \"pair_OR_Sum\", \"inputs\": [[[5, 9, 7, 6], 4], [[7, 3, 5], 3], [[7, 3], 2]], \"outputs\": [47, 12, 4]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "pair_OR_Sum",
"index": 31,
"n_tests": 3,
"problem_id": "mbpp_633",
"prompt_tokens": 103,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the sum of fourth power of first n even natural numbers.\ndef even_Power_Sum(n):\n\t\nUse Call... | code | {
"ground_truth": "{\"fn_name\": \"even_Power_Sum\", \"inputs\": [[2], [3], [4]], \"outputs\": [272, 1568, 5664]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "even_Power_Sum",
"index": 32,
"n_tests": 3,
"problem_id": "mbpp_634",
"prompt_tokens": 100,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to push all values into a heap and then pop off the smallest values one at a time.\ndef heap_sort(iterable):\... | code | {
"ground_truth": "{\"fn_name\": \"heap_sort\", \"inputs\": [[[1, 3, 5, 7, 9, 2, 4, 6, 8, 0]], [[25, 35, 22, 85, 14, 65, 75, 25, 58]], [[7, 1, 9, 5]]], \"outputs\": [[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[14, 22, 25, 25, 35, 58, 65, 75, 85]], [[1, 5, 7, 9]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "heap_sort",
"index": 33,
"n_tests": 3,
"problem_id": "mbpp_635",
"prompt_tokens": 102,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to check if roots of a quadratic equation are reciprocal of each other or not.\ndef Check_Solution(a, ... | code | {
"ground_truth": "{\"fn_name\": \"Check_Solution\", \"inputs\": [[2, 0, 2], [2, -5, 2], [1, 2, 3]], \"outputs\": [\"Yes\", \"Yes\", \"No\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "Check_Solution",
"index": 34,
"n_tests": 3,
"problem_id": "mbpp_636",
"prompt_tokens": 104,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check whether the given amount has no profit and no loss\ndef noprofit_noloss(actual_cost, sale_amount):\n... | code | {
"ground_truth": "{\"fn_name\": \"noprofit_noloss\", \"inputs\": [[1500, 1200], [100, 100], [2000, 5000]], \"outputs\": [false, true, false]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "noprofit_noloss",
"index": 35,
"n_tests": 3,
"problem_id": "mbpp_637",
"prompt_tokens": 103,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to calculate wind chill index.\ndef wind_chill(v, t):\n\t\nUse Call-Based format\nANSWER:\n",
"role": "us... | code | {
"ground_truth": "{\"fn_name\": \"wind_chill\", \"inputs\": [[120, 35], [40, 70], [10, 100]], \"outputs\": [40, 86, 116]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "wind_chill",
"index": 36,
"n_tests": 3,
"problem_id": "mbpp_638",
"prompt_tokens": 91,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to sum the length of the names of a given list of names after removing the names that start with a lowercase ... | code | {
"ground_truth": "{\"fn_name\": \"sample_nam\", \"inputs\": [[[\"sally\", \"Dylan\", \"rebecca\", \"Diana\", \"Joanne\", \"keith\"]], [[\"php\", \"res\", \"Python\", \"abcd\", \"Java\", \"aaa\"]], [[\"abcd\", \"Python\", \"abba\", \"aba\"]]], \"outputs\": [16, 10, 6]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sample_nam",
"index": 37,
"n_tests": 3,
"problem_id": "mbpp_639",
"prompt_tokens": 108,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to remove the parenthesis area in a string.\ndef remove_parenthesis(items):\n\t\nUse Call-Based format\nANSWE... | code | {
"ground_truth": "{\"fn_name\": \"remove_parenthesis\", \"inputs\": [[[\"python (chrome)\"]], [[\"string(.abc)\"]], [[\"alpha(num)\"]]], \"outputs\": [\"python\", \"string\", \"alpha\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_parenthesis",
"index": 38,
"n_tests": 3,
"problem_id": "mbpp_640",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the nth nonagonal number.\ndef is_nonagonal(n):\n\t\nUse Call-Based format\nANSWER:\n",
"role": "... | code | {
"ground_truth": "{\"fn_name\": \"is_nonagonal\", \"inputs\": [[10], [15], [18]], \"outputs\": [325, 750, 1089]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "is_nonagonal",
"index": 39,
"n_tests": 3,
"problem_id": "mbpp_641",
"prompt_tokens": 91,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function that matches a word containing 'z', not at the start or end of the word.\ndef text_match_wordz_middle(text):\... | code | {
"ground_truth": "{\"fn_name\": \"text_match_wordz_middle\", \"inputs\": [[\"pythonzabc.\"], [\"xyzabc.\"], [\" lang .\"]], \"outputs\": [\"Found a match!\", \"Found a match!\", \"Not matched!\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "text_match_wordz_middle",
"index": 40,
"n_tests": 3,
"problem_id": "mbpp_643",
"prompt_tokens": 103,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to reverse an array upto a given position.\ndef reverse_Array_Upto_K(input, k):\n\t\nUse Call-Based fo... | code | {
"ground_truth": "{\"fn_name\": \"reverse_Array_Upto_K\", \"inputs\": [[[1, 2, 3, 4, 5, 6], 4], [[4, 5, 6, 7], 2], [[9, 8, 7, 6, 5], 3]], \"outputs\": [[[4, 3, 2, 1, 5, 6]], [[5, 4, 6, 7]], [[7, 8, 9, 6, 5]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "reverse_Array_Upto_K",
"index": 41,
"n_tests": 3,
"problem_id": "mbpp_644",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the product of it’s kth index in the given tuples.\ndef find_k_product(test_list, K):\n\t\nUse Call-B... | code | {
"ground_truth": "{\"fn_name\": \"find_k_product\", \"inputs\": [[[[5, 6, 7], [1, 3, 5], [8, 9, 19]], 2], [[[6, 7, 8], [2, 4, 6], [9, 10, 20]], 1], [[[7, 8, 9], [3, 5, 7], [10, 11, 21]], 0]], \"outputs\": [665, 280, 210]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_k_product",
"index": 42,
"n_tests": 3,
"problem_id": "mbpp_645",
"prompt_tokens": 101,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to count number of cubes of size k in a cube of size n.\ndef No_of_cubes(N, K):\n\t\nUse Call-Based fo... | code | {
"ground_truth": "{\"fn_name\": \"No_of_cubes\", \"inputs\": [[2, 1], [5, 2], [1, 1]], \"outputs\": [8, 64, 1]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "No_of_cubes",
"index": 43,
"n_tests": 3,
"problem_id": "mbpp_646",
"prompt_tokens": 102,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to split a string at uppercase letters.\ndef split_upperstring(text):\n\t\nUse Call-Based format\nANSWER:\n",... | code | {
"ground_truth": "{\"fn_name\": \"split_upperstring\", \"inputs\": [[\"PythonProgramLanguage\"], [\"PythonProgram\"], [\"ProgrammingLanguage\"]], \"outputs\": [[[\"Python\", \"Program\", \"Language\"]], [[\"Python\", \"Program\"]], [[\"Programming\", \"Language\"]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "split_upperstring",
"index": 44,
"n_tests": 3,
"problem_id": "mbpp_647",
"prompt_tokens": 91,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to exchange the position of every n-th value with (n+1)th value and (n+1)th value with n-th value in a given ... | code | {
"ground_truth": "{\"fn_name\": \"exchange_elements\", \"inputs\": [[[0, 1, 2, 3, 4, 5]], [[5, 6, 7, 8, 9, 10]], [[25, 35, 45, 55, 75, 95]]], \"outputs\": [[[1, 0, 3, 2, 5, 4]], [[6, 5, 8, 7, 10, 9]], [[35, 25, 55, 45, 95, 75]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "exchange_elements",
"index": 45,
"n_tests": 3,
"problem_id": "mbpp_648",
"prompt_tokens": 116,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to calculate the sum of the numbers in a list between the indices of a specified range.\ndef sum_Range... | code | {
"ground_truth": "{\"fn_name\": \"sum_Range_list\", \"inputs\": [[[2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], 8, 10], [[1, 2, 3, 4, 5], 1, 2], [[1, 0, 1, 2, 5, 6], 4, 5]], \"outputs\": [29, 5, 11]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sum_Range_list",
"index": 46,
"n_tests": 3,
"problem_id": "mbpp_649",
"prompt_tokens": 107,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to check whether the given two arrays are equal or not.\ndef are_Equal(arr1, arr2, n, m):\n\t\nUse Cal... | code | {
"ground_truth": "{\"fn_name\": \"are_Equal\", \"inputs\": [[[1, 2, 3], [3, 2, 1], 3, 3], [[1, 1, 1], [2, 2, 2], 3, 3], [[8, 9], [4, 5, 6], 2, 3]], \"outputs\": [true, false, false]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "are_Equal",
"index": 47,
"n_tests": 3,
"problem_id": "mbpp_650",
"prompt_tokens": 104,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check if one tuple is a subset of another tuple.\ndef check_subset(test_tup1, test_tup2):\n\t\nUse Call-Ba... | code | {
"ground_truth": "{\"fn_name\": \"check_subset\", \"inputs\": [[[10, 4, 5, 6], [5, 10]], [[1, 2, 3, 4], [5, 6]], [[7, 8, 9, 10], [10, 8]]], \"outputs\": [true, false, true]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "check_subset",
"index": 48,
"n_tests": 3,
"problem_id": "mbpp_651",
"prompt_tokens": 102,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to flatten the given tuple matrix into the tuple list with each tuple representing each column.\ndef matrix_t... | code | {
"ground_truth": "{\"fn_name\": \"matrix_to_list\", \"inputs\": [[[[[4, 5], [7, 8]], [[10, 13], [18, 17]], [[0, 4], [10, 1]]]], [[[[5, 6], [8, 9]], [[11, 14], [19, 18]], [[1, 5], [11, 2]]]], [[[[6, 7], [9, 10]], [[12, 15], [20, 21]], [[23, 7], [15, 8]]]]], \"outputs\": [\"[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "matrix_to_list",
"index": 49,
"n_tests": 3,
"problem_id": "mbpp_652",
"prompt_tokens": 101,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to group a sequence of key-value pairs into a dictionary of lists using collections module.\ndef grouping_dic... | code | {
"ground_truth": "{\"fn_name\": \"grouping_dictionary\", \"inputs\": [[[[\"yellow\", 1], [\"blue\", 2], [\"yellow\", 3], [\"blue\", 4], [\"red\", 1]]], [[[\"yellow\", 10], [\"blue\", 20], [\"yellow\", 30], [\"blue\", 40], [\"red\", 10]]], [[[\"yellow\", 15], [\"blue\", 25], [\"yellow\", 35], [\"blue\", 45], [\"red\"... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "grouping_dictionary",
"index": 50,
"n_tests": 3,
"problem_id": "mbpp_653",
"prompt_tokens": 99,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the perimeter of a rectangle.\ndef rectangle_perimeter(l, b):\n\t\nUse Call-Based format\nANSWER:\n",... | code | {
"ground_truth": "{\"fn_name\": \"rectangle_perimeter\", \"inputs\": [[10, 20], [10, 5], [4, 2]], \"outputs\": [60, 30, 12]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "rectangle_perimeter",
"index": 51,
"n_tests": 3,
"problem_id": "mbpp_654",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the sum of fifth power of n natural numbers.\ndef fifth_Power_Sum(n):\n\t\nUse Call-Based form... | code | {
"ground_truth": "{\"fn_name\": \"fifth_Power_Sum\", \"inputs\": [[2], [4], [3]], \"outputs\": [33, 1300, 276]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "fifth_Power_Sum",
"index": 52,
"n_tests": 3,
"problem_id": "mbpp_655",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the minimum sum of absolute differences of two arrays.\ndef find_Min_Sum(a, b, n):\n\t\nUse Ca... | code | {
"ground_truth": "{\"fn_name\": \"find_Min_Sum\", \"inputs\": [[[3, 2, 1], [2, 1, 3], 3], [[1, 2, 3], [4, 5, 6], 3], [[4, 1, 8, 7], [2, 3, 6, 5], 4]], \"outputs\": [0, 9, 6]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_Min_Sum",
"index": 53,
"n_tests": 3,
"problem_id": "mbpp_656",
"prompt_tokens": 101,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the first digit in factorial of a given number.\ndef first_Digit(n):\n\t\nUse Call-Based forma... | code | {
"ground_truth": "{\"fn_name\": \"first_Digit\", \"inputs\": [[5], [10], [7]], \"outputs\": [1, 3, 5]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "first_Digit",
"index": 54,
"n_tests": 3,
"problem_id": "mbpp_657",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the item with maximum occurrences in a given list.\ndef max_occurrences(list1):\n\t\nUse Call-Based f... | code | {
"ground_truth": "{\"fn_name\": \"max_occurrences\", \"inputs\": [[[2, 3, 8, 4, 7, 9, 8, 2, 6, 5, 1, 6, 1, 2, 3, 4, 6, 9, 1, 2]], [[1, 3, 5, 7, 1, 3, 13, 15, 17, 5, 7, 9, 1, 11]], [[1, 2, 3, 2, 4, 5, 1, 1, 1]]], \"outputs\": [2, 1, 1]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "max_occurrences",
"index": 55,
"n_tests": 3,
"problem_id": "mbpp_658",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to print duplicants from a list of integers.\ndef Repeat(x):\n\t\nUse Call-Based format\nANSWER:\n",
... | code | {
"ground_truth": "{\"fn_name\": \"Repeat\", \"inputs\": [[[10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20]], [[-1, 1, -1, 8]], [[1, 2, 3, 1, 2]]], \"outputs\": [[[20, 30, -20, 60]], [[-1]], [[1, 2]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "Repeat",
"index": 56,
"n_tests": 3,
"problem_id": "mbpp_659",
"prompt_tokens": 92,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to choose points from two ranges such that no point lies in both the ranges.\ndef find_Points(l1, r1, ... | code | {
"ground_truth": "{\"fn_name\": \"find_Points\", \"inputs\": [[5, 10, 1, 5], [3, 5, 7, 9], [1, 5, 2, 8]], \"outputs\": [[[1, 10]], [[3, 9]], [[1, 8]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_Points",
"index": 57,
"n_tests": 3,
"problem_id": "mbpp_660",
"prompt_tokens": 110,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the maximum sum that can be formed which has no three consecutive elements present.\ndef max_sum_of_t... | code | {
"ground_truth": "{\"fn_name\": \"max_sum_of_three_consecutive\", \"inputs\": [[[100, 1000, 100, 1000, 1], 5], [[3000, 2000, 1000, 3, 10], 5], [[1, 2, 3, 4, 5, 6, 7, 8], 8]], \"outputs\": [2101, 5013, 27]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "max_sum_of_three_consecutive",
"index": 58,
"n_tests": 3,
"problem_id": "mbpp_661",
"prompt_tokens": 105,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to sort a list in a dictionary.\ndef sorted_dict(dict1):\n\t\nUse Call-Based format\nANSWER:\n",
"role": ... | code | {
"ground_truth": "{\"fn_name\": \"sorted_dict\", \"inputs\": [[{\"n1\": [2, 3, 1], \"n2\": [5, 1, 2], \"n3\": [3, 2, 4]}], [{\"n1\": [25, 37, 41], \"n2\": [41, 54, 63], \"n3\": [29, 38, 93]}], [{\"n1\": [58, 44, 56], \"n2\": [91, 34, 58], \"n3\": [100, 200, 300]}]], \"outputs\": [{\"n1\": [1, 2, 3], \"n2\": [1, 2, 5... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sorted_dict",
"index": 59,
"n_tests": 3,
"problem_id": "mbpp_662",
"prompt_tokens": 91,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the largest possible value of k such that k modulo x is y.\ndef find_max_val(n, x, y):\n\t\nUse Call-... | code | {
"ground_truth": "{\"fn_name\": \"find_max_val\", \"inputs\": [[15, 10, 5], [187, 10, 5], [16, 11, 1]], \"outputs\": [15, 185, 12]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "find_max_val",
"index": 60,
"n_tests": 3,
"problem_id": "mbpp_663",
"prompt_tokens": 103,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the average of even numbers till a given even number.\ndef average_Even(n):\n\t\nUse Call-Base... | code | {
"ground_truth": "{\"fn_name\": \"average_Even\", \"inputs\": [[2], [4], [100]], \"outputs\": [2, 3, 51]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "average_Even",
"index": 61,
"n_tests": 3,
"problem_id": "mbpp_664",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to shift first element to the end of given list.\ndef move_last(num_list):\n\t\nUse Call-Based format\... | code | {
"ground_truth": "{\"fn_name\": \"move_last\", \"inputs\": [[[1, 2, 3, 4]], [[2, 3, 4, 1, 5, 0]], [[5, 4, 3, 2, 1]]], \"outputs\": [[[2, 3, 4, 1]], [[3, 4, 1, 5, 0, 2]], [[4, 3, 2, 1, 5]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "move_last",
"index": 62,
"n_tests": 3,
"problem_id": "mbpp_665",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to count occurrence of a character in a string.\ndef count_char(string, char):\n\t\nUse Call-Based format\nAN... | code | {
"ground_truth": "{\"fn_name\": \"count_char\", \"inputs\": [[\"Python\", \"o\"], [\"little\", \"t\"], [\"assert\", \"s\"]], \"outputs\": [1, 2, 2]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "count_char",
"index": 63,
"n_tests": 3,
"problem_id": "mbpp_666",
"prompt_tokens": 94,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to count number of vowels in the string.\ndef Check_Vow(string, vowels):\n\t\nUse Call-Based format\nA... | code | {
"ground_truth": "{\"fn_name\": \"Check_Vow\", \"inputs\": [[\"corner\", \"AaEeIiOoUu\"], [\"valid\", \"AaEeIiOoUu\"], [\"true\", \"AaEeIiOoUu\"]], \"outputs\": [2, 2, 2]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "Check_Vow",
"index": 64,
"n_tests": 3,
"problem_id": "mbpp_667",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to replace multiple occurence of character by single.\ndef replace(string, char):\n\t\nUse Call-Based ... | code | {
"ground_truth": "{\"fn_name\": \"replace\", \"inputs\": [[\"peep\", \"e\"], [\"Greek\", \"e\"], [\"Moon\", \"o\"]], \"outputs\": [\"pep\", \"Grek\", \"Mon\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "replace",
"index": 65,
"n_tests": 3,
"problem_id": "mbpp_668",
"prompt_tokens": 94,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check whether the given ip address is valid or not using regex.\ndef check_IP(Ip):\n\t\nUse Call-Based for... | code | {
"ground_truth": "{\"fn_name\": \"check_IP\", \"inputs\": [[\"192.168.0.1\"], [\"110.234.52.124\"], [\"366.1.2.2\"]], \"outputs\": [\"Valid IP address\", \"Valid IP address\", \"Invalid IP address\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "check_IP",
"index": 66,
"n_tests": 3,
"problem_id": "mbpp_669",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to check whether a sequence of numbers has a decreasing trend or not.\ndef decreasing_trend(nums):\n\t... | code | {
"ground_truth": "{\"fn_name\": \"decreasing_trend\", \"inputs\": [[[-4, -3, -2, -1]], [[1, 2, 3]], [[3, 2, 1]]], \"outputs\": [true, true, false]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "decreasing_trend",
"index": 67,
"n_tests": 3,
"problem_id": "mbpp_670",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to set the right most unset bit.\ndef set_Right_most_Unset_Bit(n):\n\t\nUse Call-Based format\nANSWER:... | code | {
"ground_truth": "{\"fn_name\": \"set_Right_most_Unset_Bit\", \"inputs\": [[21], [11], [15]], \"outputs\": [23, 15, 15]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "set_Right_most_Unset_Bit",
"index": 68,
"n_tests": 3,
"problem_id": "mbpp_671",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find maximum of three numbers.\ndef max_of_three(num1, num2, num3):\n\t\nUse Call-Based format\nANSWER:\n"... | code | {
"ground_truth": "{\"fn_name\": \"max_of_three\", \"inputs\": [[10, 20, 30], [55, 47, 39], [10, 49, 30]], \"outputs\": [30, 55, 49]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "max_of_three",
"index": 69,
"n_tests": 3,
"problem_id": "mbpp_672",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to convert a list of multiple integers into a single integer.\ndef convert(list):\n\t\nUse Call-Based ... | code | {
"ground_truth": "{\"fn_name\": \"convert\", \"inputs\": [[[1, 2, 3]], [[4, 5, 6]], [[7, 8, 9]]], \"outputs\": [123, 456, 789]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "convert",
"index": 70,
"n_tests": 3,
"problem_id": "mbpp_673",
"prompt_tokens": 94,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to remove duplicate words from a given string using collections module.\ndef remove_duplicate(string):\n\t\nU... | code | {
"ground_truth": "{\"fn_name\": \"remove_duplicate\", \"inputs\": [[\"Python Exercises Practice Solution Exercises\"], [\"Python Exercises Practice Solution Python\"], [\"Python Exercises Practice Solution Practice\"]], \"outputs\": [\"Python Exercises Practice Solution\", \"Python Exercises Practice Solution\", \"P... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_duplicate",
"index": 71,
"n_tests": 3,
"problem_id": "mbpp_674",
"prompt_tokens": 94,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to add two integers. however, if the sum is between the given range it will return 20.\ndef sum_nums(x, y, m,... | code | {
"ground_truth": "{\"fn_name\": \"sum_nums\", \"inputs\": [[2, 10, 11, 20], [15, 17, 1, 10], [10, 15, 5, 30]], \"outputs\": [20, 32, 20]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sum_nums",
"index": 72,
"n_tests": 3,
"problem_id": "mbpp_675",
"prompt_tokens": 110,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to remove everything except alphanumeric characters from the given string by using regex.\ndef remove_extra_c... | code | {
"ground_truth": "{\"fn_name\": \"remove_extra_char\", \"inputs\": [[\"**//Google Android// - 12. \"], [\"****//Google Flutter//*** - 36. \"], [\"**//Google Firebase// - 478. \"]], \"outputs\": [\"GoogleAndroid12\", \"GoogleFlutter36\", \"GoogleFirebase478\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_extra_char",
"index": 73,
"n_tests": 3,
"problem_id": "mbpp_676",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check if the triangle is valid or not.\ndef validity_triangle(a, b, c):\n\t\nUse Call-Based format\nANSWER... | code | {
"ground_truth": "{\"fn_name\": \"validity_triangle\", \"inputs\": [[60, 50, 90], [45, 75, 60], [30, 50, 100]], \"outputs\": [false, true, true]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "validity_triangle",
"index": 74,
"n_tests": 3,
"problem_id": "mbpp_677",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to remove spaces from a given string.\ndef remove_spaces(str1):\n\t\nUse Call-Based format\nANSWER:\n"... | code | {
"ground_truth": "{\"fn_name\": \"remove_spaces\", \"inputs\": [[\"a b c\"], [\"1 2 3\"], [\" b c\"]], \"outputs\": [\"abc\", \"123\", \"bc\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_spaces",
"index": 75,
"n_tests": 3,
"problem_id": "mbpp_678",
"prompt_tokens": 92,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to access dictionary key’s element by index.\ndef access_key(ditionary, key):\n\t\nUse Call-Based format\nANS... | code | {
"ground_truth": "{\"fn_name\": \"access_key\", \"inputs\": [[{\"physics\": 80, \"math\": 90, \"chemistry\": 86}, 0], [{\"python\": 10, \"java\": 20, \"C++\": 30}, 2], [{\"program\": 15, \"computer\": 45}, 1]], \"outputs\": [\"physics\", \"C++\", \"computer\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "access_key",
"index": 76,
"n_tests": 3,
"problem_id": "mbpp_679",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to check whether a sequence of numbers has an increasing trend or not.\ndef increasing_trend(nums):\n\... | code | {
"ground_truth": "{\"fn_name\": \"increasing_trend\", \"inputs\": [[[1, 2, 3, 4]], [[4, 3, 2, 1]], [[0, 1, 4, 9]]], \"outputs\": [true, false, true]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "increasing_trend",
"index": 77,
"n_tests": 3,
"problem_id": "mbpp_680",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the smallest prime divisor of a number.\ndef smallest_Divisor(n):\n\t\nUse Call-Based format\n... | code | {
"ground_truth": "{\"fn_name\": \"smallest_Divisor\", \"inputs\": [[10], [25], [31]], \"outputs\": [2, 5, 31]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "smallest_Divisor",
"index": 78,
"n_tests": 3,
"problem_id": "mbpp_681",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to multiply two lists using map and lambda function.\ndef mul_list(nums1, nums2):\n\t\nUse Call-Based format\... | code | {
"ground_truth": "{\"fn_name\": \"mul_list\", \"inputs\": [[[1, 2, 3], [4, 5, 6]], [[1, 2], [3, 4]], [[90, 120], [50, 70]]], \"outputs\": [[[4, 10, 18]], [[3, 8]], [[4500, 8400]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "mul_list",
"index": 79,
"n_tests": 3,
"problem_id": "mbpp_682",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to check whether the given number can be represented by sum of two squares or not.\ndef sum_Square(n):... | code | {
"ground_truth": "{\"fn_name\": \"sum_Square\", \"inputs\": [[25], [24], [17]], \"outputs\": [true, false, true]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sum_Square",
"index": 80,
"n_tests": 3,
"problem_id": "mbpp_683",
"prompt_tokens": 101,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to count occurences of a character in a repeated string.\ndef count_Char(str, x):\n\t\nUse Call-Based ... | code | {
"ground_truth": "{\"fn_name\": \"count_Char\", \"inputs\": [[\"abcac\", \"a\"], [\"abca\", \"c\"], [\"aba\", \"a\"]], \"outputs\": [4, 2, 7]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "count_Char",
"index": 81,
"n_tests": 3,
"problem_id": "mbpp_684",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find sum of prime numbers between 1 to n.\ndef sum_Of_Primes(n):\n\t\nUse Call-Based format\nANSWER... | code | {
"ground_truth": "{\"fn_name\": \"sum_Of_Primes\", \"inputs\": [[10], [20], [5]], \"outputs\": [17, 77, 10]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "sum_Of_Primes",
"index": 82,
"n_tests": 3,
"problem_id": "mbpp_685",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the frequency of each element in the given list.\ndef freq_element(test_tup):\n\t\nUse Call-Based for... | code | {
"ground_truth": "{\"fn_name\": \"freq_element\", \"inputs\": [[[4, 5, 4, 5, 6, 6, 5, 5, 4]], [[7, 8, 8, 9, 4, 7, 6, 5, 4]], [[1, 4, 3, 1, 4, 5, 2, 6, 2, 7]]], \"outputs\": [\"{4: 3, 5: 4, 6: 2}\", \"{7: 2, 8: 2, 9: 1, 4: 2, 6: 1, 5: 1}\", \"{1: 2, 4: 2, 3: 1, 5: 1, 2: 2, 6: 1, 7: 1}\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "freq_element",
"index": 83,
"n_tests": 3,
"problem_id": "mbpp_686",
"prompt_tokens": 96,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the greatest common divisor (gcd) of two integers by using recursion.\ndef recur_gcd(a, b):\n\t\nUse ... | code | {
"ground_truth": "{\"fn_name\": \"recur_gcd\", \"inputs\": [[12, 14], [13, 17], [9, 3]], \"outputs\": [2, 1, 3]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "recur_gcd",
"index": 84,
"n_tests": 3,
"problem_id": "mbpp_687",
"prompt_tokens": 101,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to get the length of a complex number.\ndef len_complex(a, b):\n\t\nUse Call-Based format\nANSWER:\n",
"r... | code | {
"ground_truth": "{\"fn_name\": \"len_complex\", \"inputs\": [[3, 4], [9, 10], [7, 9]], \"outputs\": [5.0, 13.45362404707371, 11.40175425099138]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "len_complex",
"index": 85,
"n_tests": 3,
"problem_id": "mbpp_688",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\n## write a function to find the minimum number of jumps to reach the end of the array for the given array of integers where ea... | code | {
"ground_truth": "{\"fn_name\": \"min_jumps\", \"inputs\": [[[1, 3, 6, 1, 0, 9], 6], [[1, 3, 5, 8, 9, 2, 6, 7, 6, 8, 9], 11], [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11]], \"outputs\": [3, 3, 10]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "min_jumps",
"index": 86,
"n_tests": 3,
"problem_id": "mbpp_689",
"prompt_tokens": 133,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to multiply consecutive numbers of a given list.\ndef mul_consecutive_nums(nums):\n\t\nUse Call-Based format\... | code | {
"ground_truth": "{\"fn_name\": \"mul_consecutive_nums\", \"inputs\": [[[1, 1, 3, 4, 4, 5, 6, 7]], [[4, 5, 8, 9, 6, 10]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]], \"outputs\": [[[1, 3, 12, 16, 20, 30, 42]], [[20, 40, 72, 54, 60]], [[2, 6, 12, 20, 30, 42, 56, 72, 90]]]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "mul_consecutive_nums",
"index": 87,
"n_tests": 3,
"problem_id": "mbpp_690",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to group the 1st elements on the basis of 2nd elements in the given tuple list.\ndef group_element(test_list)... | code | {
"ground_truth": "{\"fn_name\": \"group_element\", \"inputs\": [[[[6, 5], [2, 7], [2, 5], [8, 7], [9, 8], [3, 7]]], [[[7, 6], [3, 8], [3, 6], [9, 8], [10, 9], [4, 8]]], [[[8, 7], [4, 9], [4, 7], [10, 9], [11, 10], [5, 9]]]], \"outputs\": [{\"5\": [6, 2], \"7\": [2, 8, 3], \"8\": [9]}, {\"6\": [7, 3], \"8\": [3, 9, 4... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "group_element",
"index": 88,
"n_tests": 3,
"problem_id": "mbpp_691",
"prompt_tokens": 104,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the last two digits in factorial of a given number.\ndef last_Two_Digits(N):\n\t\nUse Call-Bas... | code | {
"ground_truth": "{\"fn_name\": \"last_Two_Digits\", \"inputs\": [[7], [5], [2]], \"outputs\": [40, 20, 2]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "last_Two_Digits",
"index": 89,
"n_tests": 3,
"problem_id": "mbpp_692",
"prompt_tokens": 98,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to remove multiple spaces in a string by using regex.\ndef remove_multiple_spaces(text1):\n\t\nUse Call-Based... | code | {
"ground_truth": "{\"fn_name\": \"remove_multiple_spaces\", \"inputs\": [[\"Google Assistant\"], [\"Quad Core\"], [\"ChromeCast Built-in\"]], \"outputs\": [\"Google Assistant\", \"Quad Core\", \"ChromeCast Built-in\"]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "remove_multiple_spaces",
"index": 90,
"n_tests": 3,
"problem_id": "mbpp_693",
"prompt_tokens": 95,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to extract unique values from the given dictionary values.\ndef extract_unique(test_dict):\n\t\nUse Call-Base... | code | {
"ground_truth": "{\"fn_name\": \"extract_unique\", \"inputs\": [[{\"msm\": [5, 6, 7, 8], \"is\": [10, 11, 7, 5], \"best\": [6, 12, 10, 8], \"for\": [1, 2, 5]}], [{\"Built\": [7, 1, 9, 4], \"for\": [11, 21, 36, 14, 9], \"ISP\": [4, 1, 21, 39, 47], \"TV\": [1, 32, 38]}], [{\"F\": [11, 13, 14, 17], \"A\": [12, 11, 15,... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "extract_unique",
"index": 91,
"n_tests": 3,
"problem_id": "mbpp_694",
"prompt_tokens": 93,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to check if each element of the second tuple is greater than its corresponding index in the first tuple.\ndef... | code | {
"ground_truth": "{\"fn_name\": \"check_greater\", \"inputs\": [[[10, 4, 5], [13, 5, 18]], [[1, 2, 3], [2, 1, 4]], [[4, 5, 6], [5, 6, 7]]], \"outputs\": [true, false, true]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "check_greater",
"index": 92,
"n_tests": 3,
"problem_id": "mbpp_695",
"prompt_tokens": 110,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to zip two given lists of lists.\ndef zip_list(list1, list2):\n\t\nUse Call-Based format\nANSWER:\n",
"ro... | code | {
"ground_truth": "{\"fn_name\": \"zip_list\", \"inputs\": [[[[1, 3], [5, 7], [9, 11]], [[2, 4], [6, 8], [10, 12, 14]]], [[[1, 2], [3, 4], [5, 6]], [[7, 8], [9, 10], [11, 12]]], [[[\"a\", \"b\"], [\"c\", \"d\"]], [[\"e\", \"f\"], [\"g\", \"h\"]]]], \"outputs\": [[[[1, 3, 2, 4], [5, 7, 6, 8], [9, 11, 10, 12, 14]]], [[... | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "zip_list",
"index": 93,
"n_tests": 3,
"problem_id": "mbpp_696",
"prompt_tokens": 94,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find number of even elements in the given list using lambda function.\ndef count_even(array_nums):\n\t\nUs... | code | {
"ground_truth": "{\"fn_name\": \"count_even\", \"inputs\": [[[1, 2, 3, 5, 7, 8, 9, 10]], [[10, 15, 14, 13, -18, 12, -20]], [[1, 2, 4, 8, 9]]], \"outputs\": [3, 5, 3]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "count_even",
"index": 94,
"n_tests": 3,
"problem_id": "mbpp_697",
"prompt_tokens": 97,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a python function to find the minimum number of swaps required to convert one binary string to another.\ndef min_Swaps(s... | code | {
"ground_truth": "{\"fn_name\": \"min_Swaps\", \"inputs\": [[\"1101\", \"1110\"], [\"1111\", \"0100\"], [\"1110000\", \"0001101\"]], \"outputs\": [1, \"Not Possible\", 3]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "min_Swaps",
"index": 95,
"n_tests": 3,
"problem_id": "mbpp_699",
"prompt_tokens": 105,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to count the number of elements in a list which are within a specific range.\ndef count_range_in_list(li, min... | code | {
"ground_truth": "{\"fn_name\": \"count_range_in_list\", \"inputs\": [[[10, 20, 30, 40, 40, 40, 70, 80, 99], 40, 100], [[\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"a\", \"e\"], [[7, 8, 9, 15, 17, 19, 45], 15, 20]], \"outputs\": [6, 5, 3]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "count_range_in_list",
"index": 96,
"n_tests": 3,
"problem_id": "mbpp_700",
"prompt_tokens": 104,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the equilibrium index of the given array.\ndef equilibrium_index(arr):\n\t\nUse Call-Based format\nAN... | code | {
"ground_truth": "{\"fn_name\": \"equilibrium_index\", \"inputs\": [[[1, 2, 3, 4, 1, 2, 3]], [[-7, 1, 5, 2, -4, 3, 0]], [[1, 2, 3]]], \"outputs\": [3, 3, -1]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "equilibrium_index",
"index": 97,
"n_tests": 3,
"problem_id": "mbpp_701",
"prompt_tokens": 92,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to find the minimum number of elements that should be removed such that amax-amin<=k.\ndef removals(arr, n, k... | code | {
"ground_truth": "{\"fn_name\": \"removals\", \"inputs\": [[[1, 3, 4, 9, 10, 11, 12, 17, 20], 9, 4], [[1, 5, 6, 2, 8], 5, 2], [[1, 2, 3, 4, 5, 6], 6, 3]], \"outputs\": [5, 3, 2]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "removals",
"index": 98,
"n_tests": 3,
"problem_id": "mbpp_702",
"prompt_tokens": 106,
"split": "train"
} |
mbpp | [
{
"content": "Please write a python program to address the following QUESTION. Your ANSWER should be in a code block format like this: ```python # Write your code here ```. \nQUESTION:\nWrite a function to calculate the harmonic sum of n-1.\ndef harmonic_sum(n):\n\t\nUse Call-Based format\nANSWER:\n",
"role... | code | {
"ground_truth": "{\"fn_name\": \"harmonic_sum\", \"inputs\": [[10], [4], [7]], \"outputs\": [2.9289682539682538, 2.083333333333333, 2.5928571428571425]}",
"style": "rule"
} | {
"code_type": "call_based",
"difficulty": "BASIC",
"fn_name": "harmonic_sum",
"index": 99,
"n_tests": 3,
"problem_id": "mbpp_704",
"prompt_tokens": 92,
"split": "train"
} |
End of preview. Expand in Data Studio
ptdbench data task train set
Training file: MBPP full / train converted to the verl TACO parquet schema.
362 of 374 official train rows are included. Twelve rows are omitted because their
tests use values taco.py cannot compare after JSON decoding (custom objects,
sets, tuple dict keys, or tuple type checks).
Validation file: the existing TACO EASY held-out test.parquet, copied byte
for byte.
train.parquet SHA-256: fd42ff422d961aa4f48f17f61373ff46a5444fb20676e961606aba06a8df3907
test.parquet SHA-256: e364fa69d973f8e8644b2fa4d7dc6ec405d5b4adff64002c6ad52e7c787c6eaa
- Downloads last month
- 31