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 and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to count the number of rotations required to generate a sorted array. https://www.geeksforgeeks.org/count-of-rotations-required-to-genera... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_rotation([3,2,1]) == 1\", \"assert count_rotation([4,5,1,2,3]) == 2\", \"assert count_rotation([7,8,9,1,2,3]) == 3\", \"assert count_rotation([1,2,3]) == 0\", \"assert count_rotation([1,3,2]) == 2\"]}",
"style": "rule"
} | {
"index": "802",
"mbpp_split": "train",
"n_tests": "5",
"task_id": "802"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to iterate over elements repeating each as many times as its count.\n\nYour implementation should pass tests like the following (more tests will... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_variable(4,2,0,-2)==['p', 'p', 'p', 'p', 'q', 'q'] \", \"assert count_variable(0,1,2,3)==['q', 'r', 'r', 's', 's', 's'] \", \"assert count_variable(11,15,12,23)==['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q... | {
"index": "810",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "810"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if two lists of tuples are identical or not.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_identical([(10, 4), (2, 5)], [(10, 4), (2, 5)]) == True\", \"assert check_identical([(1, 2), (3, 7)], [(12, 14), (12, 45)]) == False\", \"assert check_identical([(2, 14), (12, 25)], [(2, 14), (12, 25)]) == True\"]}",
"style": "rule"
} | {
"index": "811",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "811"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to abbreviate 'road' as 'rd.' in a given string.\n\nYour implementation should pass tests like the following (more tests will be used for evalua... | code | {
"ground_truth": "{\"assert_case\": [\"assert road_rd(\\\"ravipadu Road\\\")==('ravipadu Rd.')\", \"assert road_rd(\\\"palnadu Road\\\")==('palnadu Rd.')\", \"assert road_rd(\\\"eshwar enclave Road\\\")==('eshwar enclave Rd.')\"]}",
"style": "rule"
} | {
"index": "812",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "812"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find length of the string.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```python... | code | {
"ground_truth": "{\"assert_case\": [\"assert string_length('python')==6\", \"assert string_length('program')==7\", \"assert string_length('language')==8\"]}",
"style": "rule"
} | {
"index": "813",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "813"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the area of a rombus.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```python... | code | {
"ground_truth": "{\"assert_case\": [\"assert rombus_area(10,20)==100\", \"assert rombus_area(10,5)==25\", \"assert rombus_area(4,2)==4\"]}",
"style": "rule"
} | {
"index": "814",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "814"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort the given array without using any sorting algorithm. the given array consists of only 0, 1, and 2.\n\nYour implementation should pass te... | code | {
"ground_truth": "{\"assert_case\": [\"assert sort_by_dnf([1,2,0,1,0,1,2,1,1], 9) == [0, 0, 1, 1, 1, 1, 1, 2, 2]\", \"assert sort_by_dnf([1,0,0,1,2,1,2,2,1,0], 10) == [0, 0, 0, 1, 1, 1, 1, 2, 2, 2]\", \"assert sort_by_dnf([2,2,1,0,0,0,1,1,2,1], 10) == [0, 0, 0, 1, 1, 1, 1, 2, 2, 2]\"]}",
"style": "rule"
} | {
"index": "815",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "815"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to clear the values of the given tuples.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n... | code | {
"ground_truth": "{\"assert_case\": [\"assert clear_tuple((1, 5, 3, 6, 8)) == ()\", \"assert clear_tuple((2, 1, 4 ,5 ,6)) == ()\", \"assert clear_tuple((3, 2, 5, 6, 8)) == ()\"]}",
"style": "rule"
} | {
"index": "816",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "816"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find numbers divisible by m or n from a list of numbers using lambda function.\n\nYour implementation should pass tests like the following (m... | code | {
"ground_truth": "{\"assert_case\": [\"assert div_of_nums([19, 65, 57, 39, 152, 639, 121, 44, 90, 190],19,13)==[19, 65, 57, 39, 152, 190]\", \"assert div_of_nums([1, 2, 3, 5, 7, 8, 10],2,5)==[2, 5, 8, 10]\", \"assert div_of_nums([10,15,14,13,18,12,20],10,5)==[10, 15, 20]\"]}",
"style": "rule"
} | {
"index": "817",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "817"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to count lower case letters in a given string.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert lower_ctr('abc') == 3\", \"assert lower_ctr('string') == 6\", \"assert lower_ctr('Python') == 5\"]}",
"style": "rule"
} | {
"index": "818",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "818"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count the frequency of consecutive duplicate elements in a given list of numbers.\n\nYour implementation should pass tests like the following... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_duplic([1,2,2,2,4,4,4,5,5,5,5])==([1, 2, 4, 5], [1, 3, 3, 4])\", \"assert count_duplic([2,2,3,1,2,6,7,9])==([2, 3, 1, 2, 6, 7, 9], [2, 1, 1, 1, 1, 1, 1])\", \"assert count_duplic([2,1,5,6,8,3,4,9,10,11,8,12])==([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], [1, 1, 1, 1, ... | {
"index": "819",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "819"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check whether the given month number contains 28 days or not.\n\nYour implementation should pass tests like the following (more tests will be... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_monthnum_number(2)==True\", \"assert check_monthnum_number(1)==False\", \"assert check_monthnum_number(3)==False\"]}",
"style": "rule"
} | {
"index": "820",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "820"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to merge two dictionaries into a single expression.\n\nYour implementation should pass tests like the following (more tests will be used for eva... | code | {
"ground_truth": "{\"assert_case\": [\"assert merge_dictionaries({ \\\"R\\\": \\\"Red\\\", \\\"B\\\": \\\"Black\\\", \\\"P\\\": \\\"Pink\\\" }, { \\\"G\\\": \\\"Green\\\", \\\"W\\\": \\\"White\\\" })=={'B': 'Black', 'R': 'Red', 'P': 'Pink', 'G': 'Green', 'W': 'White'}\", \"assert merge_dictionaries({ \\\"R\\\": \\\"... | {
"index": "821",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "821"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to return true if the password is valid.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n... | code | {
"ground_truth": "{\"assert_case\": [\"assert pass_validity(\\\"password\\\")==False\", \"assert pass_validity(\\\"Password@10\\\")==True\", \"assert pass_validity(\\\"password@10\\\")==False\"]}",
"style": "rule"
} | {
"index": "822",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "822"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if the given string starts with a substring using regex.\n\nYour implementation should pass tests like the following (more tests will b... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_substring(\\\"dreams for dreams makes life fun\\\", \\\"makes\\\") == 'string doesnt start with the given substring'\", \"assert check_substring(\\\"Hi there how are you Hi alex\\\", \\\"Hi\\\") == 'string starts with the given substring'\", \"assert check_substrin... | {
"index": "823",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "823"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to remove even numbers from a given list.\n\nYour implementation should pass tests like the following (more tests will be used for evalua... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_even([1,3,5,2]) == [1,3,5]\", \"assert remove_even([5,6,7]) == [5,7]\", \"assert remove_even([1,2,3,4]) == [1,3]\"]}",
"style": "rule"
} | {
"index": "824",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "824"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to access multiple elements of specified index from a given list.\n\nYour implementation should pass tests like the following (more tests... | code | {
"ground_truth": "{\"assert_case\": [\"assert access_elements([2,3,8,4,7,9],[0,3,5]) == [2, 4, 9]\", \"assert access_elements([1, 2, 3, 4, 5],[1,2]) == [2,3]\", \"assert access_elements([1,0,2,3],[0,1]) == [1,0]\"]}",
"style": "rule"
} | {
"index": "825",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "825"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the type of triangle from the given sides.\n\nYour implementation should pass tests like the following (more tests will be used f... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_Type_Of_Triangle(1,2,3) == \\\"Obtuse-angled Triangle\\\"\", \"assert check_Type_Of_Triangle(2,2,2) == \\\"Acute-angled Triangle\\\"\", \"assert check_Type_Of_Triangle(1,0,1) == \\\"Right-angled Triangle\\\"\"]}",
"style": "rule"
} | {
"index": "826",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "826"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sum a specific column of a list in a given list of lists.\n\nYour implementation should pass tests like the following (more tests will be use... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],0)==12\", \"assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],1)==15\", \"assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],3)==9\"]}",
"style": "rule"
} | {
"index": "827",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "827"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count alphabets,digits and special charactes in a given string.\n\nYour implementation should pass tests like the following (more tests will ... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_alpha_dig_spl(\\\"abc!@#123\\\")==(3,3,3)\", \"assert count_alpha_dig_spl(\\\"dgsuy@#$%&1255\\\")==(5,4,5)\", \"assert count_alpha_dig_spl(\\\"fjdsif627348#%$^&\\\")==(6,6,5)\"]}",
"style": "rule"
} | {
"index": "828",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "828"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find out the second most repeated (or frequent) string in the given sequence.\n\nYour implementation should pass tests like the following (mo... | code | {
"ground_truth": "{\"assert_case\": [\"assert second_frequent(['aaa','bbb','ccc','bbb','aaa','aaa']) == 'bbb'\", \"assert second_frequent(['abc','bcd','abc','bcd','bcd','bcd']) == 'abc'\", \"assert second_frequent(['cdma','gsm','hspa','gsm','cdma','cdma']) == 'gsm'\"]}",
"style": "rule"
} | {
"index": "829",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "829"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to round up a number to specific digits.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n... | code | {
"ground_truth": "{\"assert_case\": [\"assert round_up(123.01247,0)==124\", \"assert round_up(123.01247,1)==123.1\", \"assert round_up(123.01247,2)==123.02\"]}",
"style": "rule"
} | {
"index": "830",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "830"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to count equal element pairs from the given array.\n\nYour implementation should pass tests like the following (more tests will be used f... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_Pairs([1,1,1,1],4) == 6\", \"assert count_Pairs([1,5,1],3) == 1\", \"assert count_Pairs([3,2,1,7,8,9],6) == 0\"]}",
"style": "rule"
} | {
"index": "831",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "831"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to extract the maximum numeric value from a string by using regex.\n\nYour implementation should pass tests like the following (more tests will ... | code | {
"ground_truth": "{\"assert_case\": [\"assert extract_max('100klh564abc365bg') == 564\", \"assert extract_max('hello300how546mer231') == 546\", \"assert extract_max('its233beenalong343journey234') == 343\"]}",
"style": "rule"
} | {
"index": "832",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "832"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to get dictionary keys as a list.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```py... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_key({1:'python',2:'java'})==[1,2]\", \"assert get_key({10:'red',20:'blue',30:'black'})==[10,20,30]\", \"assert get_key({27:'language',39:'java',44:'little'})==[27,39,44]\"]}",
"style": "rule"
} | {
"index": "833",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "833"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to generate a square matrix filled with elements from 1 to n raised to the power of 2 in spiral order.\n\nYour implementation should pass tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert generate_matrix(3)==[[1, 2, 3], [8, 9, 4], [7, 6, 5]] \", \"assert generate_matrix(2)==[[1,2],[4,3]]\", \"assert generate_matrix(7)==[[1, 2, 3, 4, 5, 6, 7], [24, 25, 26, 27, 28, 29, 8], [23, 40, 41, 42, 43, 30, 9], [22, 39, 48, 49, 44, 31, 10], [21, 38, 47, 46, 45, 32, 1... | {
"index": "834",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "834"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the slope of a line.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```... | code | {
"ground_truth": "{\"assert_case\": [\"assert slope(4,2,2,5) == -1.5\", \"assert slope(2,4,4,6) == 1\", \"assert slope(1,2,4,2) == 0\"]}",
"style": "rule"
} | {
"index": "835",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "835"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find length of the subarray having maximum sum.\n\nYour implementation should pass tests like the following (more tests will be used for eval... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_sub_array_sum([-2, -3, 4, -1, -2, 1, 5, -3],8) == 5\", \"assert max_sub_array_sum([1, -2, 1, 1, -2, 1],6) == 2\", \"assert max_sub_array_sum([-1, -2, 3, 4, 5],5) == 3\"]}",
"style": "rule"
} | {
"index": "836",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "836"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the cube sum of first n odd natural numbers.\n\nYour implementation should pass tests like the following (more tests will be used... | code | {
"ground_truth": "{\"assert_case\": [\"assert cube_Sum(2) == 28\", \"assert cube_Sum(3) == 153\", \"assert cube_Sum(4) == 496\"]}",
"style": "rule"
} | {
"index": "837",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "837"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find minimum number swaps required to make two binary strings equal.\n\nYour implementation should pass tests like the following (more... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_Swaps(\\\"0011\\\",\\\"1111\\\") == 1\", \"assert min_Swaps(\\\"00011\\\",\\\"01001\\\") == 2\", \"assert min_Swaps(\\\"111\\\",\\\"111\\\") == 0\"]}",
"style": "rule"
} | {
"index": "838",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "838"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort the tuples alphabetically by the first item of each tuple.\n\nYour implementation should pass tests like the following (more tests will ... | code | {
"ground_truth": "{\"assert_case\": [\"assert sort_tuple([(\\\"Amana\\\", 28), (\\\"Zenat\\\", 30), (\\\"Abhishek\\\", 29),(\\\"Nikhil\\\", 21), (\\\"B\\\", \\\"C\\\")]) == [('Abhishek', 29), ('Amana', 28), ('B', 'C'), ('Nikhil', 21), ('Zenat', 30)]\", \"assert sort_tuple([(\\\"aaaa\\\", 28), (\\\"aa\\\", 30), (\\\"... | {
"index": "839",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "839"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the roots of a quadratic equation are numerically equal but opposite in sign or not.\n\nYour implementation should pass ... | code | {
"ground_truth": "{\"assert_case\": [\"assert Check_Solution(2,0,-1) == \\\"Yes\\\"\", \"assert Check_Solution(1,-5,6) == \\\"No\\\"\", \"assert Check_Solution(2,0,2) == \\\"Yes\\\"\"]}",
"style": "rule"
} | {
"index": "840",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "840"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count the number of inversions in the given array.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_inv_count([1, 20, 6, 4, 5], 5) == 5\", \"assert get_inv_count([8, 4, 2, 1], 4) == 6\", \"assert get_inv_count([3, 1, 2], 3) == 2\"]}",
"style": "rule"
} | {
"index": "841",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "841"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the number which occurs for odd number of times in the given array.\n\nYour implementation should pass tests like the following (more te... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_odd_occurence([2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2], 13) == 5\", \"assert get_odd_occurence([1, 2, 3, 2, 3, 1, 3], 7) == 3\", \"assert get_odd_occurence([5, 7, 2, 7, 5, 2, 5], 7) == 5\"]}",
"style": "rule"
} | {
"index": "842",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "842"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the nth super ugly number from a given prime list of size k using heap queue algorithm.\n\nYour implementation should pass tests like th... | code | {
"ground_truth": "{\"assert_case\": [\"assert nth_super_ugly_number(12,[2,7,13,19])==32\", \"assert nth_super_ugly_number(10,[2,7,13,19])==26\", \"assert nth_super_ugly_number(100,[2,7,13,19])==5408\"]}",
"style": "rule"
} | {
"index": "843",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "843"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the kth element in an array containing odd elements first and then even elements.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert get_Number(8,5) == 2\", \"assert get_Number(7,2) == 3\", \"assert get_Number(5,2) == 3\"]}",
"style": "rule"
} | {
"index": "844",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "844"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to count the number of digits in factorial of a given number.\n\nYour implementation should pass tests like the following (more tests wil... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_Digits(7) == 4\", \"assert find_Digits(5) == 3\", \"assert find_Digits(4) == 2\"]}",
"style": "rule"
} | {
"index": "845",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "845"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the minimum number of platforms required for a railway/bus station.\n\nYour implementation should pass tests like the following (more te... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_platform([900, 940, 950, 1100, 1500, 1800],[910, 1200, 1120, 1130, 1900, 2000],6)==3\", \"assert find_platform([100,200,300,400],[700,800,900,1000],4)==4\", \"assert find_platform([5,6,7,8],[4,3,2,1],4)==1\"]}",
"style": "rule"
} | {
"index": "846",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "846"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to copy a list from a singleton tuple.\n\nYour implementation should pass tests like the following (more tests will be used for evaluatio... | code | {
"ground_truth": "{\"assert_case\": [\"assert lcopy([1, 2, 3]) == [1, 2, 3]\", \"assert lcopy([4, 8, 2, 10, 15, 18]) == [4, 8, 2, 10, 15, 18]\", \"assert lcopy([4, 5, 6]) == [4, 5, 6]\\n\"]}",
"style": "rule"
} | {
"index": "847",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "847"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the area of a trapezium.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```pyt... | code | {
"ground_truth": "{\"assert_case\": [\"assert area_trapezium(6,9,4)==30\", \"assert area_trapezium(10,20,30)==450\", \"assert area_trapezium(15,25,35)==700\"]}",
"style": "rule"
} | {
"index": "848",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "848"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find sum of all prime divisors of a given number.\n\nYour implementation should pass tests like the following (more tests will be used... | code | {
"ground_truth": "{\"assert_case\": [\"assert Sum(60) == 10\", \"assert Sum(39) == 16\", \"assert Sum(40) == 7\"]}",
"style": "rule"
} | {
"index": "849",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "849"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if a triangle of positive area is possible with the given angles.\n\nYour implementation should pass tests like the following (more tes... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_triangleexists(50,60,70)==True\", \"assert is_triangleexists(90,45,45)==True\", \"assert is_triangleexists(150,30,70)==False\"]}",
"style": "rule"
} | {
"index": "850",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "850"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find sum of inverse of divisors.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):... | code | {
"ground_truth": "{\"assert_case\": [\"assert Sum_of_Inverse_Divisors(6,12) == 2\", \"assert Sum_of_Inverse_Divisors(9,13) == 1.44\", \"assert Sum_of_Inverse_Divisors(1,4) == 4\"]}",
"style": "rule"
} | {
"index": "851",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "851"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to remove negative numbers from a list.\n\nYour implementation should pass tests like the following (more tests will be used for evaluati... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_negs([1,-2,3,-4]) == [1,3]\", \"assert remove_negs([1,2,3,-4]) == [1,2,3]\", \"assert remove_negs([4,5,-6,7,-8]) == [4,5,7]\"]}",
"style": "rule"
} | {
"index": "852",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "852"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find sum of odd factors of a number.\n\nYour implementation should pass tests like the following (more tests will be used for evaluati... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_of_odd_Factors(30) == 24\", \"assert sum_of_odd_Factors(18) == 13\", \"assert sum_of_odd_Factors(2) == 1\"]}",
"style": "rule"
} | {
"index": "853",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "853"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function which accepts an arbitrary list and converts it to a heap using heap queue algorithm.\n\nYour implementation should pass tests like the followin... | code | {
"ground_truth": "{\"assert_case\": [\"assert raw_heap([25, 44, 68, 21, 39, 23, 89])==[21, 25, 23, 44, 39, 68, 89]\", \"assert raw_heap([25, 35, 22, 85, 14, 65, 75, 25, 58])== [14, 25, 22, 25, 35, 65, 75, 85, 58]\", \"assert raw_heap([4, 5, 6, 2])==[2, 4, 6, 5]\"]}",
"style": "rule"
} | {
"index": "854",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "854"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check for even parity of a given number.\n\nYour implementation should pass tests like the following (more tests will be used for eval... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_Even_Parity(10) == True\", \"assert check_Even_Parity(11) == False\", \"assert check_Even_Parity(18) == True\"]}",
"style": "rule"
} | {
"index": "855",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "855"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find minimum adjacent swaps required to sort binary array.\n\nYour implementation should pass tests like the following (more tests wil... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_Min_Swaps([1,0,1,0],4) == 3\", \"assert find_Min_Swaps([0,1,0],3) == 1\", \"assert find_Min_Swaps([0,0,1,1,0],5) == 2\"]}",
"style": "rule"
} | {
"index": "856",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "856"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to list out the list of given strings individually using map function.\n\nYour implementation should pass tests like the following (more tests w... | code | {
"ground_truth": "{\"assert_case\": [\"assert listify_list(['Red', 'Blue', 'Black', 'White', 'Pink'])==[['R', 'e', 'd'], ['B', 'l', 'u', 'e'], ['B', 'l', 'a', 'c', 'k'], ['W', 'h', 'i', 't', 'e'], ['P', 'i', 'n', 'k']]\", \"assert listify_list(['python'])==[['p', 'y', 't', 'h', 'o', 'n']]\", \"assert listify_list(['... | {
"index": "857",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "857"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to count number of lists in a given list of lists and square the count.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==25\", \"assert count_list([[1, 3], [5, 7], [9, 11], [13, 15, 17]] )==16\", \"assert count_list([[2, 4], [[6,8], [4,5,8]], [10, 12, 14]])==9\"]}",
"style": "rule"
} | {
"index": "858",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "858"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to generate all sublists of a given list.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\... | code | {
"ground_truth": "{\"assert_case\": [\"assert sub_lists([10, 20, 30, 40])==[[], [10], [20], [30], [40], [10, 20], [10, 30], [10, 40], [20, 30], [20, 40], [30, 40], [10, 20, 30], [10, 20, 40], [10, 30, 40], [20, 30, 40], [10, 20, 30, 40]]\", \"assert sub_lists(['X', 'Y', 'Z'])==[[], ['X'], ['Y'], ['Z'], ['X', 'Y'], [... | {
"index": "859",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "859"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check whether the given string is ending with only alphanumeric characters or not using regex.\n\nYour implementation should pass tests like ... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_alphanumeric(\\\"dawood@\\\") == 'Discard'\", \"assert check_alphanumeric(\\\"skdmsam326\\\") == 'Accept'\", \"assert check_alphanumeric(\\\"cooltricks@\\\") == 'Discard'\"]}",
"style": "rule"
} | {
"index": "860",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "860"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find all anagrams of a string in a given list of strings using lambda function.\n\nYour implementation should pass tests like the following (... | code | {
"ground_truth": "{\"assert_case\": [\"assert anagram_lambda([\\\"bcda\\\", \\\"abce\\\", \\\"cbda\\\", \\\"cbea\\\", \\\"adcb\\\"],\\\"abcd\\\")==['bcda', 'cbda', 'adcb']\", \"assert anagram_lambda([\\\"recitals\\\",\\\" python\\\"], \\\"articles\\\" )==[\\\"recitals\\\"]\", \"assert anagram_lambda([\\\" keep\\\",\... | {
"index": "861",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "861"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the occurrences of n most common words in a given text.\n\nYour implementation should pass tests like the following (more tests will be ... | code | {
"ground_truth": "{\"assert_case\": [\"assert n_common_words(\\\"python is a programming language\\\",1)==[('python', 1)]\", \"assert n_common_words(\\\"python is a programming language\\\",1)==[('python', 1)]\", \"assert n_common_words(\\\"python is a programming language\\\",5)==[('python', 1),('is', 1), ('a', 1),... | {
"index": "862",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "862"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the length of the longest sub-sequence such that elements in the subsequences are consecutive integers.\n\nYour implementation should pa... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_longest_conseq_subseq([1, 2, 2, 3], 4) == 3\", \"assert find_longest_conseq_subseq([1, 9, 3, 10, 4, 20, 2], 7) == 4\", \"assert find_longest_conseq_subseq([36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42], 11) == 5\"]}",
"style": "rule"
} | {
"index": "863",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "863"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find palindromes in a given list of strings using lambda function.\n\nYour implementation should pass tests like the following (more tests wi... | code | {
"ground_truth": "{\"assert_case\": [\"assert palindrome_lambda([\\\"php\\\", \\\"res\\\", \\\"Python\\\", \\\"abcd\\\", \\\"Java\\\", \\\"aaa\\\"])==['php', 'aaa']\", \"assert palindrome_lambda([\\\"abcd\\\", \\\"Python\\\", \\\"abba\\\", \\\"aba\\\"])==['abba', 'aba']\", \"assert palindrome_lambda([\\\"abcd\\\", \... | {
"index": "864",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "864"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to print n-times a list using map function.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation)... | code | {
"ground_truth": "{\"assert_case\": [\"assert ntimes_list([1, 2, 3, 4, 5, 6, 7],3)==[3, 6, 9, 12, 15, 18, 21]\", \"assert ntimes_list([1, 2, 3, 4, 5, 6, 7],4)==[4, 8, 12, 16, 20, 24, 28]\", \"assert ntimes_list([1, 2, 3, 4, 5, 6, 7],10)==[10, 20, 30, 40, 50, 60, 70]\"]}",
"style": "rule"
} | {
"index": "865",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "865"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check whether the given month name contains 31 days or not.\n\nYour implementation should pass tests like the following (more tests will be u... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_monthnumb(\\\"February\\\")==False\", \"assert check_monthnumb(\\\"January\\\")==True\", \"assert check_monthnumb(\\\"March\\\")==True\"]}",
"style": "rule"
} | {
"index": "866",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "866"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to add a minimum number such that the sum of array becomes even.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_Num([1,2,3,4,5,6,7,8,9],9) == 1\", \"assert min_Num([1,2,3,4,5,6,7,8],8) == 2\", \"assert min_Num([1,2,3],3) == 2\"]}",
"style": "rule"
} | {
"index": "867",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "867"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the length of the last word in a given string.\n\nYour implementation should pass tests like the following (more tests will be us... | code | {
"ground_truth": "{\"assert_case\": [\"assert length_Of_Last_Word(\\\"python language\\\") == 8\", \"assert length_Of_Last_Word(\\\"PHP\\\") == 3\", \"assert length_Of_Last_Word(\\\"\\\") == 0\"]}",
"style": "rule"
} | {
"index": "868",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "868"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove sublists from a given list of lists, which are outside a given range.\n\nYour implementation should pass tests like the following (mor... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_list_range([[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7], [9, 11], [13, 14, 15, 17]],13,17)==[[13, 14, 15, 17]]\", \"assert remove_list_range([[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7], [9, 11], [13, 14, 15, 17]],1,3)==[[2], [1, 2, 3]]\", \"assert remove_list_range([[2],... | {
"index": "869",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "869"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to calculate the sum of the positive numbers of a given list of numbers using lambda function.\n\nYour implementation should pass tests like the... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_positivenum([2, 4, -6, -9, 11, -12, 14, -5, 17])==48\", \"assert sum_positivenum([10,15,-14,13,-18,12,-20])==50\", \"assert sum_positivenum([19, -65, 57, 39, 152,-639, 121, 44, 90, -190])==522\"]}",
"style": "rule"
} | {
"index": "870",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "870"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the given strings are rotations of each other or not.\n\nYour implementation should pass tests like the following (more ... | code | {
"ground_truth": "{\"assert_case\": [\"assert are_Rotations(\\\"abc\\\",\\\"cba\\\") == False\", \"assert are_Rotations(\\\"abcd\\\",\\\"cdba\\\") == False\", \"assert are_Rotations(\\\"abacd\\\",\\\"cdaba\\\") == True\"]}",
"style": "rule"
} | {
"index": "871",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "871"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if a nested list is a subset of another nested list.\n\nYour implementation should pass tests like the following (more tests will be us... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_subset([[1, 3], [5, 7], [9, 11], [13, 15, 17]] ,[[1, 3],[13,15,17]])==True\", \"assert check_subset([[1, 2], [2, 3], [3, 4], [5, 6]],[[3, 4], [5, 6]])==True\", \"assert check_subset([[[1, 2], [2, 3]], [[3, 4], [5, 7]]],[[[3, 4], [5, 6]]])==False\"]}",
"style": "r... | {
"index": "872",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "872"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to solve the fibonacci sequence using recursion.\n\nYour implementation should pass tests like the following (more tests will be used for evalua... | code | {
"ground_truth": "{\"assert_case\": [\"assert fibonacci(7) == 13\", \"assert fibonacci(8) == 21\", \"assert fibonacci(9) == 34\"]}",
"style": "rule"
} | {
"index": "873",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "873"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check if the string is a concatenation of another string.\n\nYour implementation should pass tests like the following (more tests will... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_Concat(\\\"abcabcabc\\\",\\\"abc\\\") == True\", \"assert check_Concat(\\\"abcab\\\",\\\"abc\\\") == False\", \"assert check_Concat(\\\"aba\\\",\\\"ab\\\") == False\"]}",
"style": "rule"
} | {
"index": "874",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "874"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the minimum difference in the tuple pairs of given tuples.\n\nYour implementation should pass tests like the following (more tests will ... | code | {
"ground_truth": "{\"assert_case\": [\"assert min_difference([(3, 5), (1, 7), (10, 3), (1, 2)]) == 1\", \"assert min_difference([(4, 6), (12, 8), (11, 4), (2, 13)]) == 2\", \"assert min_difference([(5, 17), (3, 9), (12, 5), (3, 24)]) == 6\"]}",
"style": "rule"
} | {
"index": "875",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "875"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find lcm of two positive integers.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation... | code | {
"ground_truth": "{\"assert_case\": [\"assert lcm(4,6) == 12\", \"assert lcm(15,17) == 255\", \"assert lcm(2,6) == 6\"]}",
"style": "rule"
} | {
"index": "876",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "876"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to sort the given string.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```pyt... | code | {
"ground_truth": "{\"assert_case\": [\"assert sort_String(\\\"cba\\\") == \\\"abc\\\"\", \"assert sort_String(\\\"data\\\") == \\\"aadt\\\"\", \"assert sort_String(\\\"zxy\\\") == \\\"xyz\\\"\"]}",
"style": "rule"
} | {
"index": "877",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "877"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to check if the given tuple contains only k elements.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert check_tuples((3, 5, 6, 5, 3, 6),[3, 6, 5]) == True\", \"assert check_tuples((4, 5, 6, 4, 6, 5),[4, 5, 6]) == True\", \"assert check_tuples((9, 8, 7, 6, 8, 9),[9, 8, 1]) == False\"]}",
"style": "rule"
} | {
"index": "878",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "878"
} |
mbpp | [
{
"content": "Please reason step by step and 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 anything, ending in 'b' by using regex.\n\nYour implementation should pass tests like the foll... | code | {
"ground_truth": "{\"assert_case\": [\"assert text_match(\\\"aabbbbd\\\") == 'Not matched!'\", \"assert text_match(\\\"aabAbbbc\\\") == 'Not matched!'\", \"assert text_match(\\\"accddbbjjjb\\\") == 'Found a match!'\"]}",
"style": "rule"
} | {
"index": "879",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "879"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find number of solutions in quadratic equation.\n\nYour implementation should pass tests like the following (more tests will be used f... | code | {
"ground_truth": "{\"assert_case\": [\"assert Check_Solution(2,5,2) == \\\"2 solutions\\\"\", \"assert Check_Solution(1,1,1) == \\\"No solutions\\\"\", \"assert Check_Solution(1,2,1) == \\\"1 solution\\\"\"]}",
"style": "rule"
} | {
"index": "880",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "880"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the sum of first even and odd number of a given list.\n\nYour implementation should pass tests like the following (more tests will be us... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_even_odd([1,3,5,7,4,1,6,8])==5\", \"assert sum_even_odd([1,2,3,4,5,6,7,8,9,10])==3\", \"assert sum_even_odd([1,5,7,9,10])==11\"]}",
"style": "rule"
} | {
"index": "881",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "881"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to caluclate perimeter of a parallelogram.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):... | code | {
"ground_truth": "{\"assert_case\": [\"assert parallelogram_perimeter(10,20)==400\", \"assert parallelogram_perimeter(15,20)==600\", \"assert parallelogram_perimeter(8,9)==144\"]}",
"style": "rule"
} | {
"index": "882",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "882"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find numbers divisible by m and n from a list of numbers using lambda function.\n\nYour implementation should pass tests like the following (... | code | {
"ground_truth": "{\"assert_case\": [\"assert div_of_nums([19, 65, 57, 39, 152, 639, 121, 44, 90, 190],2,4)==[ 152,44]\", \"assert div_of_nums([1, 2, 3, 5, 7, 8, 10],2,5)==[10]\", \"assert div_of_nums([10,15,14,13,18,12,20],10,5)==[10,20]\"]}",
"style": "rule"
} | {
"index": "883",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "883"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether all the bits are within a given range or not.\n\nYour implementation should pass tests like the following (more tests wi... | code | {
"ground_truth": "{\"assert_case\": [\"assert all_Bits_Set_In_The_Given_Range(10,2,1) == True \", \"assert all_Bits_Set_In_The_Given_Range(5,2,4) == False\", \"assert all_Bits_Set_In_The_Given_Range(22,2,3) == True \"]}",
"style": "rule"
} | {
"index": "884",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "884"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the two given strings are isomorphic to each other or not.\n\nYour implementation should pass tests like the following (... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_Isomorphic(\\\"paper\\\",\\\"title\\\") == True\", \"assert is_Isomorphic(\\\"ab\\\",\\\"ba\\\") == True\", \"assert is_Isomorphic(\\\"ab\\\",\\\"aa\\\") == False\"]}",
"style": "rule"
} | {
"index": "885",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "885"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to add all the numbers in a list and divide it with the length of the list.\n\nYour implementation should pass tests like the following (more te... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_num((8, 2, 3, 0, 7))==4.0\", \"assert sum_num((-10,-20,-30))==-20.0\", \"assert sum_num((19,15,18))==17.333333333333332\"]}",
"style": "rule"
} | {
"index": "886",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "886"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the given number is odd or not using bitwise operator.\n\nYour implementation should pass tests like the following (more... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_odd(5) == True\", \"assert is_odd(6) == False\", \"assert is_odd(7) == True\"]}",
"style": "rule"
} | {
"index": "887",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "887"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to substract the elements of the given nested tuples.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert substract_elements(((1, 3), (4, 5), (2, 9), (1, 10)), ((6, 7), (3, 9), (1, 1), (7, 3))) == ((-5, -4), (1, -4), (1, 8), (-6, 7))\", \"assert substract_elements(((13, 4), (14, 6), (13, 10), (12, 11)), ((19, 8), (14, 10), (12, 2), (18, 4))) == ((-6, -4), (0, -4), (1, 8), (-... | {
"index": "888",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "888"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to reverse each list in a given list of lists.\n\nYour implementation should pass tests like the following (more tests will be used for evaluati... | code | {
"ground_truth": "{\"assert_case\": [\"assert reverse_list_lists([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]])==[[4, 3, 2, 1], [8, 7, 6, 5], [12, 11, 10, 9], [16, 15, 14, 13]]\", \"assert reverse_list_lists([[1,2],[2,3],[3,4]])==[[2,1],[3,2],[4,3]]\", \"assert reverse_list_lists([[10,20],[30,40]])... | {
"index": "889",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "889"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the index of an extra element present in one sorted array.\n\nYour implementation should pass tests like the following (more test... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_Extra([1,2,3,4],[1,2,3],3) == 3\", \"assert find_Extra([2,4,6,8,10],[2,4,6,8],4) == 4\", \"assert find_Extra([1,3,5,7,9,11],[1,3,5,7,9],5) == 5\"]}",
"style": "rule"
} | {
"index": "890",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "890"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the given two numbers have same number of digits or not.\n\nYour implementation should pass tests like the following (mo... | code | {
"ground_truth": "{\"assert_case\": [\"assert same_Length(12,1) == False\", \"assert same_Length(2,2) == True\", \"assert same_Length(10,20) == True\"]}",
"style": "rule"
} | {
"index": "891",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "891"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to remove multiple spaces in a string.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n... | code | {
"ground_truth": "{\"assert_case\": [\"assert remove_spaces('python program')==('python program')\", \"assert remove_spaces('python programming language')==('python programming language')\", \"assert remove_spaces('python program')==('python program')\"]}",
"style": "rule"
} | {
"index": "892",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "892"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to get the last element of each sublist.\n\nYour implementation should pass tests like the following (more tests will be used for evaluat... | code | {
"ground_truth": "{\"assert_case\": [\"assert Extract([[1, 2, 3], [4, 5], [6, 7, 8, 9]]) == [3, 5, 9]\", \"assert Extract([['x', 'y', 'z'], ['m'], ['a', 'b'], ['u', 'v']]) == ['z', 'm', 'b', 'v']\", \"assert Extract([[1, 2, 3], [4, 5]]) == [3, 5]\"]}",
"style": "rule"
} | {
"index": "893",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "893"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to convert the given string of float type into tuple.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert float_to_tuple(\\\"1.2, 1.3, 2.3, 2.4, 6.5\\\") == (1.2, 1.3, 2.3, 2.4, 6.5)\", \"assert float_to_tuple(\\\"2.3, 2.4, 5.6, 5.4, 8.9\\\") == (2.3, 2.4, 5.6, 5.4, 8.9)\", \"assert float_to_tuple(\\\"0.3, 0.5, 7.8, 9.4\\\") == (0.3, 0.5, 7.8, 9.4)\"]}",
"style": "rule"
} | {
"index": "894",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "894"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the maximum sum of subsequences of given array with no adjacent elements.\n\nYour implementation should pass tests like the following (m... | code | {
"ground_truth": "{\"assert_case\": [\"assert max_sum_subseq([1, 2, 9, 4, 5, 0, 4, 11, 6]) == 26\", \"assert max_sum_subseq([1, 2, 9, 5, 6, 0, 5, 12, 7]) == 28\", \"assert max_sum_subseq([1, 3, 10, 5, 6, 0, 6, 14, 21]) == 44\"]}",
"style": "rule"
} | {
"index": "895",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "895"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to sort a list in increasing order by the last element in each tuple from a given list of non-empty tuples.\n\nYour implementation should pass t... | code | {
"ground_truth": "{\"assert_case\": [\"assert sort_list_last([(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)])==[(2, 1), (1, 2), (2, 3), (4, 4), (2, 5)] \", \"assert sort_list_last([(9,8), (4, 7), (3,5), (7,9), (1,2)])==[(1,2), (3,5), (4,7), (9,8), (7,9)] \", \"assert sort_list_last([(20,50), (10,20), (40,40)])==[(10,20),(4... | {
"index": "896",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "896"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether the word is present in a given sentence or not.\n\nYour implementation should pass tests like the following (more tests ... | code | {
"ground_truth": "{\"assert_case\": [\"assert is_Word_Present(\\\"machine learning\\\",\\\"machine\\\") == True\", \"assert is_Word_Present(\\\"easy\\\",\\\"fun\\\") == False\", \"assert is_Word_Present(\\\"python language\\\",\\\"code\\\") == False\"]}",
"style": "rule"
} | {
"index": "897",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "897"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to extract specified number of elements from a given list, which follow each other continuously.\n\nYour implementation should pass tests like t... | code | {
"ground_truth": "{\"assert_case\": [\"assert extract_elements([1, 1, 3, 4, 4, 5, 6, 7],2)==[1, 4]\", \"assert extract_elements([0, 1, 2, 3, 4, 4, 4, 4, 5, 7],4)==[4]\", \"assert extract_elements([0,0,0,0,0],5)==[0]\"]}",
"style": "rule"
} | {
"index": "898",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "898"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to check whether an array can be sorted or not by picking only the corner elements.\n\nYour implementation should pass tests like the fol... | code | {
"ground_truth": "{\"assert_case\": [\"assert check([3,2,1,2,3,4],6) == True\", \"assert check([2,1,4,5,1],5) == True\", \"assert check([1,2,2,1,2,3],6) == True\"]}",
"style": "rule"
} | {
"index": "899",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "899"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function where a string will start with a specific number.\n\nYour implementation should pass tests like the following (more tests will be used for evalu... | code | {
"ground_truth": "{\"assert_case\": [\"assert match_num('5-2345861')==True\", \"assert match_num('6-2345861')==False\", \"assert match_num('78910')==False\"]}",
"style": "rule"
} | {
"index": "900",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "900"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the smallest multiple of the first n numbers.\n\nYour implementation should pass tests like the following (more tests will be used for e... | code | {
"ground_truth": "{\"assert_case\": [\"assert smallest_multiple(13)==360360\", \"assert smallest_multiple(2)==2\", \"assert smallest_multiple(1)==1\"]}",
"style": "rule"
} | {
"index": "901",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "901"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to combine two dictionaries by adding values for common keys.\n\nYour implementation should pass tests like the following (more tests will be us... | code | {
"ground_truth": "{\"assert_case\": [\"assert add_dict({'a': 100, 'b': 200, 'c':300},{'a': 300, 'b': 200, 'd':400})==({'b': 400, 'd': 400, 'a': 400, 'c': 300}) \", \"assert add_dict({'a': 500, 'b': 700, 'c':900},{'a': 500, 'b': 600, 'd':900})==({'b': 1300, 'd': 900, 'a': 1000, 'c': 900}) \", \"assert add_dict({'a':9... | {
"index": "902",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "902"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to count the total unset bits from 1 to n.\n\nYour implementation should pass tests like the following (more tests will be used for evalu... | code | {
"ground_truth": "{\"assert_case\": [\"assert count_Unset_Bits(2) == 1\", \"assert count_Unset_Bits(5) == 4\", \"assert count_Unset_Bits(14) == 17\"]}",
"style": "rule"
} | {
"index": "903",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "903"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to return true if the given number is even else return false.\n\nYour implementation should pass tests like the following (more tests will be us... | code | {
"ground_truth": "{\"assert_case\": [\"assert even_num(13.5)==False\", \"assert even_num(0)==True\", \"assert even_num(-9)==False\"]}",
"style": "rule"
} | {
"index": "904",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "904"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a python function to find the sum of squares of binomial co-efficients.\n\nYour implementation should pass tests like the following (more tests will be use... | code | {
"ground_truth": "{\"assert_case\": [\"assert sum_of_square(4) == 70\", \"assert sum_of_square(5) == 252\", \"assert sum_of_square(2) == 6\"]}",
"style": "rule"
} | {
"index": "905",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "905"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to extract year, month and date from a url by using regex.\n\nYour implementation should pass tests like the following (more tests will be used ... | code | {
"ground_truth": "{\"assert_case\": [\"assert extract_date(\\\"https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/\\\") == [('2016', '09', '02')]\", \"assert extract_date(\\\"https://www.indiatoday.in/movies/celebrities/stor... | {
"index": "906",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "906"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to print the first n lucky numbers.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation):\n\n```... | code | {
"ground_truth": "{\"assert_case\": [\"assert lucky_num(10)==[1, 3, 7, 9, 13, 15, 21, 25, 31, 33] \", \"assert lucky_num(5)==[1, 3, 7, 9, 13]\", \"assert lucky_num(8)==[1, 3, 7, 9, 13, 15, 21, 25]\"]}",
"style": "rule"
} | {
"index": "907",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "907"
} |
mbpp | [
{
"content": "Please reason step by step and put your final solution in a single ```python code block.",
"role": "system"
},
{
"content": "Write a function to find the fixed point in the given array.\n\nYour implementation should pass tests like the following (more tests will be used for evaluation)... | code | {
"ground_truth": "{\"assert_case\": [\"assert find_fixed_point([-10, -1, 0, 3, 10, 11, 30, 50, 100],9) == 3\", \"assert find_fixed_point([1, 2, 3, 4, 5, 6, 7, 8],8) == -1\", \"assert find_fixed_point([0, 2, 5, 8, 17],5) == 0\"]}",
"style": "rule"
} | {
"index": "908",
"mbpp_split": "train",
"n_tests": "3",
"task_id": "908"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.