data_source stringclasses 1
value | prompt listlengths 2 2 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the previous palindrome of a specified number.\n\nYour implementation should pass tests like the follo... | code | {
"ground_truth": "{\"assert_case\": [\"assert previous_palindrome(99)==88\", \"assert previous_palindrome(1221)==1111\", \"assert previous_palindrome(120)==111\"]}",
"style": "rule"
} | {
"index": "909",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "909"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to validate a gregorian date.\n\nYour implementation should pass tests like the following (more tests will be ... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_date(11,11,2002)==True\", \"assert check_date(13,11,2002)==False\", \"assert check_date('11','11','2002')==True\"]}",
"style": "rule"
} | {
"index": "910",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "910"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to compute maximum product of three numbers of a given array of integers using heap queue algorithm.\n\nYour i... | code | {
"ground_truth": "{\"assert_case\": [\"assert maximum_product( [12, 74, 9, 50, 61, 41])==225700\", \"assert maximum_product([25, 35, 22, 85, 14, 65, 75, 25, 58])==414375\", \"assert maximum_product([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1])==2520\"]}",
"style": "rule"
} | {
"index": "911",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "911"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find ln, m lobb number.\n\nYour implementation should pass tests like the following (more tests will be use... | code | {
"ground_truth": "{\"assert_case\": [\"assert int(lobb_num(5, 3)) == 35\", \"assert int(lobb_num(3, 2)) == 5\", \"assert int(lobb_num(4, 2)) == 20\"]}",
"style": "rule"
} | {
"index": "912",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "912"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check for a number at the end of a string.\n\nYour implementation should pass tests like the following (mor... | code | {
"ground_truth": "{\"assert_case\": [\"assert end_num('abcdef')==False\", \"assert end_num('abcdef7')==True\", \"assert end_num('abc')==False\"]}",
"style": "rule"
} | {
"index": "913",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "913"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the given string is made up of two alternating characters or not.\n\nYour implementati... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_Two_Alter(\\\"abab\\\") == True\", \"assert is_Two_Alter(\\\"aaaa\\\") == False\", \"assert is_Two_Alter(\\\"xyz\\\") == False\"]}",
"style": "rule"
} | {
"index": "914",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "914"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to rearrange positive and negative numbers in a given array using lambda function.\n\nYour implementation shou... | code | {
"ground_truth": "{\"assert_case\": [\"assert rearrange_numbs([-1, 2, -3, 5, 7, 8, 9, -10])==[2, 5, 7, 8, 9, -10, -3, -1]\", \"assert rearrange_numbs([10,15,14,13,-18,12,-20])==[10, 12, 13, 14, 15, -20, -18]\", \"assert rearrange_numbs([-20,20,-10,10,-30,30])==[10, 20, 30, -30, -20, -10]\"]}",
"style": "rule"
} | {
"index": "915",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "915"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find if there is a triplet in the array whose sum is equal to a given value.\n\nYour implementation should ... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_triplet_array([1, 4, 45, 6, 10, 8], 6, 22) == (4, 10, 8)\", \"assert find_triplet_array([12, 3, 5, 2, 6, 9], 6, 24) == (12, 3, 9)\", \"assert find_triplet_array([1, 2, 3, 4, 5], 5, 9) == (1, 3, 5)\"]}",
"style": "rule"
} | {
"index": "916",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "916"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the sequences of one upper case letter followed by lower case letters.\n\nYour implementation should p... | code | {
"ground_truth": "{\"assert_case\": [\"assert text_uppercase_lowercase(\\\"AaBbGg\\\")==('Found a match!')\", \"assert text_uppercase_lowercase(\\\"aA\\\")==('Not matched!')\", \"assert text_uppercase_lowercase(\\\"PYTHON\\\")==('Not matched!')\"]}",
"style": "rule"
} | {
"index": "917",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "917"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count coin change.\n\nYour implementation should pass tests like the following (more tests will be used for... | code | {
"ground_truth": "{\"assert_case\": [\"assert coin_change([1, 2, 3],3,4)==4\", \"assert coin_change([4,5,6,7,8,9],6,9)==2\", \"assert coin_change([4,5,6,7,8,9],6,4)==1\"]}",
"style": "rule"
} | {
"index": "918",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "918"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to multiply all items in the list.\n\nYour implementation should pass tests like the following (more te... | code | {
"ground_truth": "{\"assert_case\": [\"assert multiply_list([1,-2,3]) == -6\", \"assert multiply_list([1,2,3,4]) == 24\", \"assert multiply_list([3,1,2,3]) == 18\"]}",
"style": "rule"
} | {
"index": "919",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "919"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove all tuples with all none values in the given tuple list.\n\nYour implementation should pass tests li... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_tuple([(None, 2), (None, None), (3, 4), (12, 3), (None, )] ) == '[(None, 2), (3, 4), (12, 3)]'\", \"assert remove_tuple([(None, None), (None, None), (3, 6), (17, 3), (None,1 )] ) == '[(3, 6), (17, 3), (None, 1)]'\", \"assert remove_tuple([(1, 2), (2, None), (3, No... | {
"index": "920",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "920"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to perform chunking of tuples each of size n.\n\nYour implementation should pass tests like the following (mor... | code | {
"ground_truth": "{\"assert_case\": [\"assert chunk_tuples((10, 4, 5, 6, 7, 6, 8, 3, 4), 3) == [(10, 4, 5), (6, 7, 6), (8, 3, 4)]\", \"assert chunk_tuples((1, 2, 3, 4, 5, 6, 7, 8, 9), 2) == [(1, 2), (3, 4), (5, 6), (7, 8), (9,)]\", \"assert chunk_tuples((11, 14, 16, 17, 19, 21, 22, 25), 4) == [(11, 14, 16, 17), (19,... | {
"index": "921",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "921"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find a pair with the highest product from a given array of integers.\n\nYour implementation should pass tes... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_product([1, 2, 3, 4, 7, 0, 8, 4])==(7, 8)\", \"assert max_product([0, -1, -2, -4, 5, 0, -6])==(-4, -6)\", \"assert max_product([1, 3, 5, 6, 8, 9])==(8,9)\"]}",
"style": "rule"
} | {
"index": "922",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "922"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the length of the shortest string that has both str1 and str2 as subsequences.\n\nYour implementation ... | code | {
"ground_truth": "{\"assert_case\": [\"assert super_seq(\\\"AGGTAB\\\", \\\"GXTXAYB\\\", 6, 7) == 9\", \"assert super_seq(\\\"feek\\\", \\\"eke\\\", 4, 3) == 5\", \"assert super_seq(\\\"PARRT\\\", \\\"RTA\\\", 5, 3) == 6\"]}",
"style": "rule"
} | {
"index": "923",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "923"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find maximum of two numbers.\n\nYour implementation should pass tests like the following (more tests will b... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_of_two(10,20)==20\", \"assert max_of_two(19,15)==19\", \"assert max_of_two(-10,-20)==-10\"]}",
"style": "rule"
} | {
"index": "924",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "924"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to calculate the product of all the numbers of a given tuple.\n\nYour implementation should pass tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert mutiple_tuple((4, 3, 2, 2, -1, 18)) == -864\", \"assert mutiple_tuple((1,2,3)) == 6\", \"assert mutiple_tuple((-2,-4,-6)) == -48\"]}",
"style": "rule"
} | {
"index": "925",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "925"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find n-th rencontres number.\n\nYour implementation should pass tests like the following (more tests will b... | code | {
"ground_truth": "{\"assert_case\": [\"assert rencontres_number(7, 2) == 924\", \"assert rencontres_number(3, 0) == 2\", \"assert rencontres_number(3, 1) == 3\"]}",
"style": "rule"
} | {
"index": "926",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "926"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate the height of the given binary tree.\n\nYour implementation should pass tests like the following ... | code | {
"ground_truth": "{\"assert_case\": [\"root = Node(1) \\nroot.left = Node(2) \\nroot.right = Node(3) \\nroot.left.left = Node(4) \\nroot.left.right = Node(5) \\nroot1 = Node(1); \\nroot1.left = Node(2); \\nroot1.right = Node(3); \\nroot1.left.left = Node(4); \\nroot1.right.left = Node(5); \\nroot1.right.right =... | {
"index": "927",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "927"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\n\nYour implementation should pass tests like the... | code | {
"ground_truth": "{\"assert_case\": [\"assert change_date_format('2026-01-02')=='02-01-2026'\", \"assert change_date_format('2021-01-04')=='04-01-2021'\", \"assert change_date_format('2030-06-06')=='06-06-2030'\"]}",
"style": "rule"
} | {
"index": "928",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "928"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count repeated items of a tuple.\n\nYour implementation should pass tests like the following (more tests wi... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_tuplex((2, 4, 5, 6, 2, 3, 4, 4, 7),4)==3\", \"assert count_tuplex((2, 4, 5, 6, 2, 3, 4, 4, 7),2)==2\", \"assert count_tuplex((2, 4, 7, 7, 7, 3, 4, 4, 7),7)==4\"]}",
"style": "rule"
} | {
"index": "929",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "929"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function that matches a string that has an a followed by zero or more b's by using regex.\n\nYour implementation should... | code | {
"ground_truth": "{\"assert_case\": [\"assert text_match(\\\"msb\\\") == 'Not matched!'\", \"assert text_match(\\\"a0c\\\") == 'Found a match!'\", \"assert text_match(\\\"abbc\\\") == 'Found a match!'\"]}",
"style": "rule"
} | {
"index": "930",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "930"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate the sum of series 1³+2³+3³+….+n³.\n\nYour implementation should pass tests like the following (mo... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_series(7)==784\", \"assert sum_series(5)==225\", \"assert sum_series(15)==14400\"]}",
"style": "rule"
} | {
"index": "931",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "931"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove duplicate words from a given list of strings.\n\nYour implementation should pass tests like the foll... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_duplic_list([\\\"Python\\\", \\\"Exercises\\\", \\\"Practice\\\", \\\"Solution\\\", \\\"Exercises\\\"])==['Python', 'Exercises', 'Practice', 'Solution']\", \"assert remove_duplic_list([\\\"Python\\\", \\\"Exercises\\\", \\\"Practice\\\", \\\"Solution\\\", \\\"Exer... | {
"index": "932",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "932"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert camel case string to snake case string by using regex.\n\nYour implementation should pass tests lik... | code | {
"ground_truth": "{\"assert_case\": [\"assert camel_to_snake('GoogleAssistant') == 'google_assistant'\", \"assert camel_to_snake('ChromeCast') == 'chrome_cast'\", \"assert camel_to_snake('QuadCore') == 'quad_core'\"]}",
"style": "rule"
} | {
"index": "933",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "933"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the nth delannoy number.\n\nYour implementation should pass tests like the following (more tests will ... | code | {
"ground_truth": "{\"assert_case\": [\"assert dealnnoy_num(3, 4) == 129\", \"assert dealnnoy_num(3, 3) == 63\", \"assert dealnnoy_num(4, 5) == 681\"]}",
"style": "rule"
} | {
"index": "934",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "934"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate the sum of series 1²+2²+3²+….+n².\n\nYour implementation should pass tests like the following (mo... | code | {
"ground_truth": "{\"assert_case\": [\"assert series_sum(6)==91\", \"assert series_sum(7)==140\", \"assert series_sum(12)==650\"]}",
"style": "rule"
} | {
"index": "935",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "935"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to re-arrange the given tuples based on the given ordered list.\n\nYour implementation should pass tests like ... | code | {
"ground_truth": "{\"assert_case\": [\"assert re_arrange_tuples([(4, 3), (1, 9), (2, 10), (3, 2)], [1, 4, 2, 3]) == [(1, 9), (4, 3), (2, 10), (3, 2)]\", \"assert re_arrange_tuples([(5, 4), (2, 10), (3, 11), (4, 3)], [3, 4, 2, 3]) == [(3, 11), (4, 3), (2, 10), (3, 11)]\", \"assert re_arrange_tuples([(6, 3), (3, 8),... | {
"index": "936",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "936"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count the most common character in a given string.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_char(\\\"hello world\\\")==('l')\", \"assert max_char(\\\"hello \\\")==('l')\", \"assert max_char(\\\"python pr\\\")==('p')\"]}",
"style": "rule"
} | {
"index": "937",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "937"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find three closest elements from three sorted arrays.\n\nYour implementation should pass tests like the fol... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_closet([1, 4, 10],[2, 15, 20],[10, 12],3,3,2) == (10, 15, 10)\", \"assert find_closet([20, 24, 100],[2, 19, 22, 79, 800],[10, 12, 23, 24, 119],3,5,5) == (24, 22, 23)\", \"assert find_closet([2, 5, 11],[3, 16, 21],[11, 13],3,3,2) == (11, 16, 11)\"]}",
"style": "rul... | {
"index": "938",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "938"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort a list of dictionaries using lambda function.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert sorted_models([{'make':'Nokia', 'model':216, 'color':'Black'}, {'make':'Mi Max', 'model':2, 'color':'Gold'}, {'make':'Samsung', 'model': 7, 'color':'Blue'}])==[{'make': 'Nokia', 'model': 216, 'color': 'Black'}, {'make': 'Samsung', 'model': 7, 'color': 'Blue'}, {'make': '... | {
"index": "939",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "939"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort the given array by using heap sort.\n\nYour implementation should pass tests like the following (more ... | code | {
"ground_truth": "{\"assert_case\": [\"assert heap_sort([12, 2, 4, 5, 2, 3]) == [2, 2, 3, 4, 5, 12]\", \"assert heap_sort([32, 14, 5, 6, 7, 19]) == [5, 6, 7, 14, 19, 32]\", \"assert heap_sort([21, 15, 29, 78, 65]) == [15, 21, 29, 65, 78]\"]}",
"style": "rule"
} | {
"index": "940",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "940"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count the elements in a list until an element is a tuple.\n\nYour implementation should pass tests like the... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_elim([10,20,30,(10,20),40])==3\", \"assert count_elim([10,(20,30),(10,20),40])==1\", \"assert count_elim([(10,(20,30,(10,20),40))])==0\"]}",
"style": "rule"
} | {
"index": "941",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "941"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if any list element is present in the given list.\n\nYour implementation should pass tests like the f... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_element((4, 5, 7, 9, 3), [6, 7, 10, 11]) == True\", \"assert check_element((1, 2, 3, 4), [4, 6, 7, 8, 9]) == True\", \"assert check_element((3, 2, 1, 4, 5), [9, 8, 7, 6]) == False\"]}",
"style": "rule"
} | {
"index": "942",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "942"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to combine two given sorted lists using heapq module.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert combine_lists([1, 3, 5, 7, 9, 11],[0, 2, 4, 6, 8, 10])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\", \"assert combine_lists([1, 3, 5, 6, 8, 9], [2, 5, 7, 11])==[1,2,3,5,5,6,7,8,9,11]\", \"assert combine_lists([1,3,7],[2,4,6])==[1,2,3,4,6,7]\"]}",
"style": "rule"
} | {
"index": "943",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "943"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to separate and print the numbers and their position of a given string.\n\nYour implementation should pass tes... | code | {
"ground_truth": "{\"assert_case\": [\"assert num_position(\\\"there are 70 flats in this apartment\\\")==10\", \"assert num_position(\\\"every adult have 32 teeth\\\")==17\", \"assert num_position(\\\"isha has 79 chocolates in her bag\\\")==9\"]}",
"style": "rule"
} | {
"index": "944",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "944"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert the given tuples into set.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert tuple_to_set(('x', 'y', 'z') ) == {'y', 'x', 'z'}\", \"assert tuple_to_set(('a', 'b', 'c') ) == {'c', 'a', 'b'}\", \"assert tuple_to_set(('z', 'd', 'e') ) == {'d', 'e', 'z'}\"]}",
"style": "rule"
} | {
"index": "945",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "945"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the most common elements and their counts of a specified text.\n\nYour implementation should pass test... | code | {
"ground_truth": "{\"assert_case\": [\"assert most_common_elem('lkseropewdssafsdfafkpwe',3)==[('s', 4), ('e', 3), ('f', 3)] \", \"assert most_common_elem('lkseropewdssafsdfafkpwe',2)==[('s', 4), ('e', 3)]\", \"assert most_common_elem('lkseropewdssafsdfafkpwe',7)==[('s', 4), ('e', 3), ('f', 3), ('k', 2), ('p', 2), ('... | {
"index": "946",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "946"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the length of the shortest word.\n\nYour implementation should pass tests like the following (m... | code | {
"ground_truth": "{\"assert_case\": [\"assert len_log([\\\"win\\\",\\\"lose\\\",\\\"great\\\"]) == 3\", \"assert len_log([\\\"a\\\",\\\"ab\\\",\\\"abc\\\"]) == 1\", \"assert len_log([\\\"12\\\",\\\"12\\\",\\\"1234\\\"]) == 2\"]}",
"style": "rule"
} | {
"index": "947",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "947"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to get an item of a tuple.\n\nYour implementation should pass tests like the following (more tests will be use... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_item((\\\"w\\\", 3, \\\"r\\\", \\\"e\\\", \\\"s\\\", \\\"o\\\", \\\"u\\\", \\\"r\\\", \\\"c\\\", \\\"e\\\"),3)==('e')\", \"assert get_item((\\\"w\\\", 3, \\\"r\\\", \\\"e\\\", \\\"s\\\", \\\"o\\\", \\\"u\\\", \\\"r\\\", \\\"c\\\", \\\"e\\\"),-4)==('u')\", \"assert ge... | {
"index": "948",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "948"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort the given tuple list basis the total digits in tuple.\n\nYour implementation should pass tests like th... | code | {
"ground_truth": "{\"assert_case\": [\"assert sort_list([(3, 4, 6, 723), (1, 2), (12345,), (134, 234, 34)] ) == '[(1, 2), (12345,), (3, 4, 6, 723), (134, 234, 34)]'\", \"assert sort_list([(3, 4, 8), (1, 2), (1234335,), (1345, 234, 334)] ) == '[(1, 2), (3, 4, 8), (1234335,), (1345, 234, 334)]'\", \"assert sort_list([... | {
"index": "949",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "949"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to display sign of the chinese zodiac for given year.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert chinese_zodiac(1997)==('Ox')\", \"assert chinese_zodiac(1998)==('Tiger')\", \"assert chinese_zodiac(1994)==('Dog')\"]}",
"style": "rule"
} | {
"index": "950",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "950"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the maximum of similar indices in two lists of tuples.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_similar_indices([(2, 4), (6, 7), (5, 1)],[(5, 4), (8, 10), (8, 14)]) == [(5, 4), (8, 10), (8, 14)]\", \"assert max_similar_indices([(3, 5), (7, 8), (6, 2)],[(6, 5), (9, 11), (9, 15)]) == [(6, 5), (9, 11), (9, 15)]\", \"assert max_similar_indices([(4, 6), (8, 9), (7, ... | {
"index": "951",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "951"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to compute the value of ncr mod p.\n\nYour implementation should pass tests like the following (more tests wil... | code | {
"ground_truth": "{\"assert_case\": [\"assert nCr_mod_p(10, 2, 13) == 6\", \"assert nCr_mod_p(11, 3, 14) == 11\", \"assert nCr_mod_p(18, 14, 19) == 1\"]}",
"style": "rule"
} | {
"index": "952",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "952"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the minimun number of subsets with distinct elements.\n\nYour implementation should pass tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert subset([1, 2, 3, 4],4) == 1\", \"assert subset([5, 6, 9, 3, 4, 3, 4],7) == 2\", \"assert subset([1, 2, 3 ],3) == 1\"]}",
"style": "rule"
} | {
"index": "953",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "953"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function that gives profit amount if the given amount has profit else return none.\n\nYour implementation should pass t... | code | {
"ground_truth": "{\"assert_case\": [\"assert profit_amount(1500,1200)==300\", \"assert profit_amount(100,200)==None\", \"assert profit_amount(2000,5000)==None\"]}",
"style": "rule"
} | {
"index": "954",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "954"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find out, if the given number is abundant.\n\nYour implementation should pass tests like the following (mor... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_abundant(12)==True\", \"assert is_abundant(13)==False\", \"assert is_abundant(9)==False\"]}",
"style": "rule"
} | {
"index": "955",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "955"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to split the given string at uppercase letters by using regex.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert split_list(\\\"LearnToBuildAnythingWithGoogle\\\") == ['Learn', 'To', 'Build', 'Anything', 'With', 'Google']\", \"assert split_list(\\\"ApmlifyingTheBlack+DeveloperCommunity\\\") == ['Apmlifying', 'The', 'Black+', 'Developer', 'Community']\", \"assert split_list(\\\"Upda... | {
"index": "956",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "956"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to get the position of rightmost set bit.\n\nYour implementation should pass tests like the following (... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_First_Set_Bit_Pos(12) == 3\", \"assert get_First_Set_Bit_Pos(18) == 2\", \"assert get_First_Set_Bit_Pos(16) == 5\"]}",
"style": "rule"
} | {
"index": "957",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "957"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert an integer into a roman numeral.\n\nYour implementation should pass tests like the following (more ... | code | {
"ground_truth": "{\"assert_case\": [\"assert int_to_roman(1)==(\\\"I\\\")\", \"assert int_to_roman(50)==(\\\"L\\\")\", \"assert int_to_roman(4)==(\\\"IV\\\")\"]}",
"style": "rule"
} | {
"index": "958",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "958"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the average of a list.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert Average([15, 9, 55, 41, 35, 20, 62, 49]) == 35.75\", \"assert Average([4, 5, 1, 2, 9, 7, 10, 8]) == 5.75\", \"assert Average([1,2,3]) == 2\"]}",
"style": "rule"
} | {
"index": "959",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "959"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to solve tiling problem.\n\nYour implementation should pass tests like the following (more tests will be used ... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_noOfways(4)==3\", \"assert get_noOfways(3)==2\", \"assert get_noOfways(5)==5\"]}",
"style": "rule"
} | {
"index": "960",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "960"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert a roman numeral to an integer.\n\nYour implementation should pass tests like the following (more te... | code | {
"ground_truth": "{\"assert_case\": [\"assert roman_to_int('MMMCMLXXXVI')==3986\", \"assert roman_to_int('MMMM')==4000\", \"assert roman_to_int('C')==100\"]}",
"style": "rule"
} | {
"index": "961",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "961"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the sum of all even natural numbers within the range l and r.\n\nYour implementation should pas... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_Even(2,5) == 6\", \"assert sum_Even(3,8) == 18\", \"assert sum_Even(4,6) == 10\"]}",
"style": "rule"
} | {
"index": "962",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "962"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate the discriminant value.\n\nYour implementation should pass tests like the following (more tests w... | code | {
"ground_truth": "{\"assert_case\": [\"assert discriminant_value(4,8,2)==(\\\"Two solutions\\\",32)\", \"assert discriminant_value(5,7,9)==(\\\"no real solution\\\",-131)\", \"assert discriminant_value(0,0,9)==(\\\"one solution\\\",0)\"]}",
"style": "rule"
} | {
"index": "963",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "963"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the length of the word is even or not.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert word_len(\\\"program\\\") == False\", \"assert word_len(\\\"solution\\\") == True\", \"assert word_len(\\\"data\\\") == True\"]}",
"style": "rule"
} | {
"index": "964",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "964"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert camel case string to snake case string.\n\nYour implementation should pass tests like the following... | code | {
"ground_truth": "{\"assert_case\": [\"assert camel_to_snake('PythonProgram')==('python_program')\", \"assert camel_to_snake('pythonLanguage')==('python_language')\", \"assert camel_to_snake('ProgrammingLanguage')==('programming_language')\"]}",
"style": "rule"
} | {
"index": "965",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "965"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove an empty tuple from a list of tuples.\n\nYour implementation should pass tests like the following (m... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_empty([(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')])==[('',), ('a', 'b'), ('a', 'b', 'c'), 'd'] \", \"assert remove_empty([(), (), ('',), (\\\"python\\\"), (\\\"program\\\")])==[('',), (\\\"python\\\"), (\\\"program\\\")] \", \"assert remove_empty([(), (),... | {
"index": "966",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "966"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to accept the strings which contains all vowels.\n\nYour implementation should pass tests like the foll... | code | {
"ground_truth": "{\"assert_case\": [\"assert check(\\\"SEEquoiaL\\\") == 'accepted'\", \"assert check('program') == \\\"not accepted\\\"\", \"assert check('fine') == \\\"not accepted\\\"\"]}",
"style": "rule"
} | {
"index": "967",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "967"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find maximum possible value for the given periodic function.\n\nYour implementation should pass test... | code | {
"ground_truth": "{\"assert_case\": [\"assert floor_Max(11,10,9) == 9\", \"assert floor_Max(5,7,4) == 2\", \"assert floor_Max(2,2,1) == 1\"]}",
"style": "rule"
} | {
"index": "968",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "968"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to join the tuples if they have similar initial elements.\n\nYour implementation should pass tests like the fo... | code | {
"ground_truth": "{\"assert_case\": [\"assert join_tuples([(5, 6), (5, 7), (6, 8), (6, 10), (7, 13)] ) == [(5, 6, 7), (6, 8, 10), (7, 13)]\", \"assert join_tuples([(6, 7), (6, 8), (7, 9), (7, 11), (8, 14)] ) == [(6, 7, 8), (7, 9, 11), (8, 14)]\", \"assert join_tuples([(7, 8), (7, 9), (8, 10), (8, 12), (9, 15)] ) == ... | {
"index": "969",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "969"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find minimum of two numbers.\n\nYour implementation should pass tests like the following (more tests will b... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_of_two(10,20)==10\", \"assert min_of_two(19,15)==15\", \"assert min_of_two(-10,-20)==-20\"]}",
"style": "rule"
} | {
"index": "970",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "970"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the maximum number of segments of lengths a, b and c that can be formed from n.\n\nYour implementation... | code | {
"ground_truth": "{\"assert_case\": [\"assert maximum_segments(7, 5, 2, 5) == 2\", \"assert maximum_segments(17, 2, 1, 3) == 17\", \"assert maximum_segments(18, 16, 3, 6) == 6\"]}",
"style": "rule"
} | {
"index": "971",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "971"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to concatenate the given two tuples to a nested tuple.\n\nYour implementation should pass tests like the follo... | code | {
"ground_truth": "{\"assert_case\": [\"assert concatenate_nested((3, 4), (5, 6)) == (3, 4, 5, 6)\", \"assert concatenate_nested((1, 2), (3, 4)) == (1, 2, 3, 4)\", \"assert concatenate_nested((4, 5), (6, 8)) == (4, 5, 6, 8)\"]}",
"style": "rule"
} | {
"index": "972",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "972"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to left rotate the string.\n\nYour implementation should pass tests like the following (more tests will... | code | {
"ground_truth": "{\"assert_case\": [\"assert left_rotate(\\\"python\\\",2) == \\\"thonpy\\\" \", \"assert left_rotate(\\\"bigdata\\\",3 ) == \\\"databig\\\" \", \"assert left_rotate(\\\"hadoop\\\",1 ) == \\\"adooph\\\" \"]}",
"style": "rule"
} | {
"index": "973",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "973"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the minimum total path sum in the given triangle.\n\nYour implementation should pass tests like the fo... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_sum_path([[ 2 ], [3, 9 ], [1, 6, 7 ]]) == 6\", \"assert min_sum_path([[ 2 ], [3, 7 ], [8, 5, 6 ]]) == 10 \", \"assert min_sum_path([[ 3 ], [6, 4 ], [5, 2, 7 ]]) == 9\"]}",
"style": "rule"
} | {
"index": "974",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "974"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find minimum sum of factors of a given number.\n\nYour implementation should pass tests like the fol... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_Min_Sum(12) == 7\", \"assert find_Min_Sum(105) == 15\", \"assert find_Min_Sum(2) == 2\"]}",
"style": "rule"
} | {
"index": "511",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "511"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count the element frequency in the mixed nested tuple.\n\nYour implementation should pass tests like the fo... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_element_freq((5, 6, (5, 6), 7, (8, 9), 9) ) == {5: 2, 6: 2, 7: 1, 8: 1, 9: 2}\", \"assert count_element_freq((6, 7, (6, 7), 8, (9, 10), 10) ) == {6: 2, 7: 2, 8: 1, 9: 1, 10: 2}\", \"assert count_element_freq((7, 8, (7, 8), 9, (10, 11), 11) ) == {7: 2, 8: 2, 9: 1, 1... | {
"index": "512",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "512"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert tuple into list by adding the given string after every element.\n\nYour implementation should pass ... | code | {
"ground_truth": "{\"assert_case\": [\"assert add_str((5, 6, 7, 4, 9) , \\\"FDF\\\") == [5, 'FDF', 6, 'FDF', 7, 'FDF', 4, 'FDF', 9, 'FDF']\", \"assert add_str((7, 8, 9, 10) , \\\"PF\\\") == [7, 'PF', 8, 'PF', 9, 'PF', 10, 'PF']\", \"assert add_str((11, 14, 12, 1, 4) , \\\"JH\\\") == [11, 'JH', 14, 'JH', 12, 'JH', 1,... | {
"index": "513",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "513"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the summation of tuple elements in the given tuple list.\n\nYour implementation should pass tests like... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_elements((7, 8, 9, 1, 10, 7)) == 42\", \"assert sum_elements((1, 2, 3, 4, 5, 6)) == 21\", \"assert sum_elements((11, 12 ,13 ,45, 14)) == 95\"]}",
"style": "rule"
} | {
"index": "514",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "514"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if there is a subset with sum divisible by m.\n\nYour implementation should pass tests like the follo... | code | {
"ground_truth": "{\"assert_case\": [\"assert modular_sum([3, 1, 7, 5], 4, 6) == True\", \"assert modular_sum([1, 7], 2, 5) == False\", \"assert modular_sum([1, 6], 2, 5) == False\"]}",
"style": "rule"
} | {
"index": "515",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "515"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort a list of elements using radix sort.\n\nYour implementation should pass tests like the following (more... | code | {
"ground_truth": "{\"assert_case\": [\"assert radix_sort([15, 79, 25, 68, 37]) == [15, 25, 37, 68, 79]\", \"assert radix_sort([9, 11, 8, 7, 3, 2]) == [2, 3, 7, 8, 9, 11]\", \"assert radix_sort([36, 12, 24, 26, 29]) == [12, 24, 26, 29, 36]\"]}",
"style": "rule"
} | {
"index": "516",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "516"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the largest postive number from the given list.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert largest_pos([1,2,3,4,-1]) == 4\", \"assert largest_pos([0,1,2,-5,-1,6]) == 6\", \"assert largest_pos([0,0,1,0]) == 1\"]}",
"style": "rule"
} | {
"index": "517",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "517"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the square root of a perfect number.\n\nYour implementation should pass tests like the following (more... | code | {
"ground_truth": "{\"assert_case\": [\"assert sqrt_root(4)==2\", \"assert sqrt_root(16)==4\", \"assert sqrt_root(400)==20\"]}",
"style": "rule"
} | {
"index": "518",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "518"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate volume of a tetrahedron.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert volume_tetrahedron(10)==117.85\", \"assert volume_tetrahedron(15)==397.75\", \"assert volume_tetrahedron(20)==942.81\"]}",
"style": "rule"
} | {
"index": "519",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "519"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the lcm of the given array elements.\n\nYour implementation should pass tests like the following (more... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_lcm([2, 7, 3, 9, 4]) == 252\", \"assert get_lcm([1, 2, 8, 3]) == 24\", \"assert get_lcm([3, 8, 4, 10, 5]) == 120\"]}",
"style": "rule"
} | {
"index": "520",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "520"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to print check if the triangle is scalene or not.\n\nYour implementation should pass tests like the following ... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_isosceles(6,8,12)==True\", \"assert check_isosceles(6,6,12)==False\", \"assert check_isosceles(6,15,20)==True\"]}",
"style": "rule"
} | {
"index": "521",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "521"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the longest bitonic subsequence for the given array.\n\nYour implementation should pass tests like the... | code | {
"ground_truth": "{\"assert_case\": [\"assert lbs([0 , 8 , 4, 12, 2, 10 , 6 , 14 , 1 , 9 , 5 , 13, 3, 11 , 7 , 15]) == 7\", \"assert lbs([1, 11, 2, 10, 4, 5, 2, 1]) == 6\", \"assert lbs([80, 60, 30, 40, 20, 10]) == 5\"]}",
"style": "rule"
} | {
"index": "522",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "522"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check whether a given string has a capital letter, a lower case letter, a number and specified length using... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_string('python')==['String must have 1 upper case character.', 'String must have 1 number.', 'String length should be atleast 8.']\", \"assert check_string('123python')==['String must have 1 upper case character.']\", \"assert check_string('123Python')==['Valid str... | {
"index": "523",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "523"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the sum of maximum increasing subsequence of the given array.\n\nYour implementation should pass tests... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_sum_increasing_subsequence([1, 101, 2, 3, 100, 4, 5], 7) == 106\", \"assert max_sum_increasing_subsequence([3, 4, 5, 10], 4) == 22\", \"assert max_sum_increasing_subsequence([10, 5, 4, 3], 4) == 10\"]}",
"style": "rule"
} | {
"index": "524",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "524"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether two given lines are parallel or not.\n\nYour implementation should pass tests like the... | code | {
"ground_truth": "{\"assert_case\": [\"assert parallel_lines([2,3,4], [2,3,8]) == True\", \"assert parallel_lines([2,3,4], [4,-3,8]) == False\", \"assert parallel_lines([3,3],[5,5]) == True\"]}",
"style": "rule"
} | {
"index": "525",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "525"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to capitalize first and last letters of each word of a given string.\n\nYour implementation should pass... | code | {
"ground_truth": "{\"assert_case\": [\"assert capitalize_first_last_letters(\\\"python\\\") == \\\"PythoN\\\"\", \"assert capitalize_first_last_letters(\\\"bigdata\\\") == \\\"BigdatA\\\"\", \"assert capitalize_first_last_letters(\\\"Hadoop\\\") == \\\"HadooP\\\"\"]}",
"style": "rule"
} | {
"index": "526",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "526"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find all pairs in an integer array whose sum is equal to a given number.\n\nYour implementation should pass... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_pairs_count([1, 5, 7, -1, 5], 5, 6) == 3\", \"assert get_pairs_count([1, 5, 7, -1], 4, 6) == 2\", \"assert get_pairs_count([1, 1, 1, 1], 4, 2) == 6\"]}",
"style": "rule"
} | {
"index": "527",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "527"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the list of lists with minimum length.\n\nYour implementation should pass tests like the following (mo... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_length([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(1, [0])\", \"assert min_length([[1], [5, 7], [10, 12, 14,15]])==(1, [1])\", \"assert min_length([[5], [15,20,25]])==(1, [5])\"]}",
"style": "rule"
} | {
"index": "528",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "528"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the nth jacobsthal-lucas number.\n\nYour implementation should pass tests like the following (more tes... | code | {
"ground_truth": "{\"assert_case\": [\"assert jacobsthal_lucas(5) == 31\", \"assert jacobsthal_lucas(2) == 5\", \"assert jacobsthal_lucas(4) == 17\"]}",
"style": "rule"
} | {
"index": "529",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "529"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the ration of negative numbers in an array of integers.\n\nYour implementation should pass tests like ... | code | {
"ground_truth": "{\"assert_case\": [\"assert negative_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.31\", \"assert negative_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.31\", \"assert negative_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.44\"]}",
"style": "rule"
} | {
"index": "530",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "530"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find minimum number of coins that make a given value.\n\nYour implementation should pass tests like the fol... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_coins([9, 6, 5, 1] ,4,11)==2\", \"assert min_coins([4,5,6,7,8,9],6,9)==1\", \"assert min_coins([1, 2, 3],3,4)==2\"]}",
"style": "rule"
} | {
"index": "531",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "531"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if the two given strings are permutations of each other.\n\nYour implementation should pass tests lik... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_permutation(\\\"abc\\\", \\\"cba\\\") == True\", \"assert check_permutation(\\\"test\\\", \\\"ttew\\\") == False\", \"assert check_permutation(\\\"xxyz\\\", \\\"yxzx\\\") == True\"]}",
"style": "rule"
} | {
"index": "532",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "532"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove particular data type elements from the given tuple.\n\nYour implementation should pass tests like th... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_datatype((4, 5, 4, 7.7, 1.2), int) == [7.7, 1.2]\", \"assert remove_datatype((7, 8, 9, \\\"SR\\\"), str) == [7, 8, 9]\", \"assert remove_datatype((7, 1.1, 2, 2.2), float) == [7, 2]\"]}",
"style": "rule"
} | {
"index": "533",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "533"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to search a literals string in a string and also find the location within the original string where the patter... | code | {
"ground_truth": "{\"assert_case\": [\"assert search_literal('python','python programming language')==(0,6)\", \"assert search_literal('programming','python programming language')==(7,18)\", \"assert search_literal('language','python programming language')==(19,27)\"]}",
"style": "rule"
} | {
"index": "534",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "534"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the top or bottom surface area of a cylinder.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert topbottom_surfacearea(10)==314.15000000000003\", \"assert topbottom_surfacearea(5)==78.53750000000001\", \"assert topbottom_surfacearea(4)==50.264\"]}",
"style": "rule"
} | {
"index": "535",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "535"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to select the nth items of a list.\n\nYour implementation should pass tests like the following (more tests wil... | code | {
"ground_truth": "{\"assert_case\": [\"assert nth_items([1, 2, 3, 4, 5, 6, 7, 8, 9],2)==[1, 3, 5, 7, 9] \", \"assert nth_items([10,15,19,17,16,18],3)==[10,17] \", \"assert nth_items([14,16,19,15,17],4)==[14,17]\"]}",
"style": "rule"
} | {
"index": "536",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "536"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the first repeated word in a given string.\n\nYour implementation should pass tests like the fo... | code | {
"ground_truth": "{\"assert_case\": [\"assert first_repeated_word(\\\"ab ca bc ab\\\") == \\\"ab\\\"\", \"assert first_repeated_word(\\\"ab ca bc\\\") == 'None'\", \"assert first_repeated_word(\\\"ab ca bc ca ab bc\\\") == \\\"ca\\\"\"]}",
"style": "rule"
} | {
"index": "537",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "537"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to convert a given string list to a tuple.\n\nYour implementation should pass tests like the following ... | code | {
"ground_truth": "{\"assert_case\": [\"assert string_list_to_tuple((\\\"python 3.0\\\")) == ('p', 'y', 't', 'h', 'o', 'n', '3', '.', '0')\", \"assert string_list_to_tuple((\\\"bigdata\\\")) == ('b', 'i', 'g', 'd', 'a', 't', 'a')\", \"assert string_list_to_tuple((\\\"language\\\")) == ('l', 'a', 'n', 'g', 'u', 'a', '... | {
"index": "538",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "538"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to create a list containing the power of said number in bases raised to the corresponding number in the index ... | code | {
"ground_truth": "{\"assert_case\": [\"assert basesnum_coresspondingnum([10, 20, 30, 40, 50, 60, 70, 80, 90, 100],[1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[10, 400, 27000, 2560000, 312500000, 46656000000, 8235430000000, 1677721600000000, 387420489000000000, 100000000000000000000]\", \"assert basesnum_coresspondingnum([1, 2... | {
"index": "539",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "539"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the difference between highest and least frequencies in a given array.\n\nYour implementation s... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_Diff([1,1,2,2,7,8,4,5,1,4],10) == 2\", \"assert find_Diff([1,7,9,2,3,3,1,3,3],9) == 3\", \"assert find_Diff([1,2,1,2],4) == 0\"]}",
"style": "rule"
} | {
"index": "540",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "540"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find if the given number is abundant or not.\n\nYour implementation should pass tests like the following (m... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_abundant(12) == True\", \"assert check_abundant(15) == False\", \"assert check_abundant(18) == True\"]}",
"style": "rule"
} | {
"index": "541",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "541"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to replace all occurrences of spaces, commas, or dots with a colon in the given string by using regex.\n\nYour... | code | {
"ground_truth": "{\"assert_case\": [\"assert fill_spaces('Boult Curve Wireless Neckband') == 'Boult:Curve:Wireless:Neckband'\", \"assert fill_spaces('Stereo Sound Sweatproof') == 'Stereo:Sound:Sweatproof'\", \"assert fill_spaces('Probass Curve Audio') == 'Probass:Curve:Audio'\"]}",
"style": "rule"
} | {
"index": "542",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "542"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to add two numbers and print number of digits of sum.\n\nYour implementation should pass tests like the follow... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_digits(9875,10)==(4)\", \"assert count_digits(98759853034,100)==(11)\", \"assert count_digits(1234567,500)==(7)\"]}",
"style": "rule"
} | {
"index": "543",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "543"
} |
mbpp | [
{
"content": "Please reason step by step inside a <think> </think> block, then put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to flatten the tuple list to a string.\n\nYour implementation should pass tests like the following (more tests... | code | {
"ground_truth": "{\"assert_case\": [\"assert flatten_tuple([('1', '4', '6'), ('5', '8'), ('2', '9'), ('1', '10')]) == '1 4 6 5 8 2 9 1 10'\", \"assert flatten_tuple([('2', '3', '4'), ('6', '9'), ('3', '2'), ('2', '11')]) == '2 3 4 6 9 3 2 2 11'\", \"assert flatten_tuple([('14', '21', '9'), ('24', '19'), ('12', '29'... | {
"index": "544",
"mbpp_split": "validation",
"n_tests": "3",
"task_id": "544"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.