{"id":"mbpp","measured_tasks":0,"name":"MBPP","note":"Complete source roster. Preparation is not execution, grading or a leaderboard score.","official_tasks":500,"schema_version":1,"scope":"full","source_sha256":"ccf64ceae9c5403bf50a044cb6d505bfd2a2963ee58338ba268fd65beab92a9f","source_url":"https://github.com/google-research/google-research/tree/f46ca8374b4cddef97ca4208ad986049d74d296a/mbpp","split":"test · source IDs 11–510 (training and validation excluded)","status":"prepared","task_manifest_sha256":"77740a01de33aab80a2a80f88ae35410cb50ccaf41ee0a46bd9698e32cac0abb","tasks":[{"category":"Python","id":"mbpp-100","prompt":"Write a function to find the next smallest palindrome of a specified number.\n\nSource prompt examples:\nassert next_smallest_palindrome(99)==101\nassert next_smallest_palindrome(1221)==1331\nassert next_smallest_palindrome(120)==121","source_id":"100","source_row_sha256":"e8b2591ff0e25091a0103c27cf65d5d2cf296cf81775098b872075c42b2de03e"},{"category":"Python","id":"mbpp-101","prompt":"Write a function to find the kth element in the given array.\n\nSource prompt examples:\nassert kth_element([12,3,5,7,19], 5, 2) == 3\nassert kth_element([17,24,8,23], 4, 3) == 8\nassert kth_element([16,21,25,36,4], 5, 4) == 36","source_id":"101","source_row_sha256":"7a8035b94e865f5a7fb36f47b98dc9d3c7721e66ef71ac93530dea46aee47783"},{"category":"Python","id":"mbpp-102","prompt":"Write a function to convert snake case string to camel case string.\n\nSource prompt examples:\nassert snake_to_camel('python_program')=='PythonProgram'\nassert snake_to_camel('python_language')==('PythonLanguage')\nassert snake_to_camel('programming_language')==('ProgrammingLanguage')","source_id":"102","source_row_sha256":"3dfbf2d1c5a429ecf78b2bb332f5c9cda3cd5c7d779ae89faac054c9aab022e6"},{"category":"Python","id":"mbpp-103","prompt":"Write a function to find eulerian number a(n, m).\n\nSource prompt examples:\nassert eulerian_num(3, 1) == 4\nassert eulerian_num(4, 1) == 11\nassert eulerian_num(5, 3) == 26","source_id":"103","source_row_sha256":"bb89f2a1d40d22616e854aed69554b05403c2b33e76823252a5d1753a2a9fa6e"},{"category":"Python","id":"mbpp-104","prompt":"Write a function to sort each sublist of strings in a given list of lists using lambda function.\n\nSource prompt examples:\nassert sort_sublists(([\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]))==[['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']]\nassert sort_sublists(([\" red \",\"green\" ],[\"blue \",\" black\"],[\" orange\",\"brown\"]))==[[' red ', 'green'], [' black', 'blue '], [' orange', 'brown']]\nassert sort_sublists(([\"zilver\",\"gold\"], [\"magnesium\",\"aluminium\"], [\"steel\", \"bronze\"]))==[['gold', 'zilver'],['aluminium', 'magnesium'], ['bronze', 'steel']]","source_id":"104","source_row_sha256":"73e11dbf659df16f1259db8e67ad48e11736aa694f2a93011edc1d9677cf8948"},{"category":"Python","id":"mbpp-105","prompt":"Write a python function to count true booleans in the given list.\n\nSource prompt examples:\nassert count([True,False,True]) == 2\nassert count([False,False]) == 0\nassert count([True,True,True]) == 3","source_id":"105","source_row_sha256":"be62ea3ca4fd61daa2a8fc1f87d825fa591ab73e98f9df16ef956a9f9bbeacb9"},{"category":"Python","id":"mbpp-106","prompt":"Write a function to add the given list to the given tuples.\n\nSource prompt examples:\nassert add_lists([5, 6, 7], (9, 10)) == (9, 10, 5, 6, 7)\nassert add_lists([6, 7, 8], (10, 11)) == (10, 11, 6, 7, 8)\nassert add_lists([7, 8, 9], (11, 12)) == (11, 12, 7, 8, 9)","source_id":"106","source_row_sha256":"25310e752d6cdaa3da5eb0e9b28fae53e61f99a665f176f70f5cdb362ee2ee33"},{"category":"Python","id":"mbpp-107","prompt":"Write a python function to count hexadecimal numbers for a given range.\n\nSource prompt examples:\nassert count_Hexadecimal(10,15) == 6\nassert count_Hexadecimal(2,4) == 0\nassert count_Hexadecimal(15,16) == 1","source_id":"107","source_row_sha256":"1d98ba769908b9f6169d20121fea03c69da468afeff11c58f364e49f26498f6b"},{"category":"Python","id":"mbpp-108","prompt":"Write a function to merge multiple sorted inputs into a single sorted iterator using heap queue algorithm.\n\nSource prompt examples:\nassert merge_sorted_list([25, 24, 15, 4, 5, 29, 110],[19, 20, 11, 56, 25, 233, 154],[24, 26, 54, 48])==[4, 5, 11, 15, 19, 20, 24, 24, 25, 25, 26, 29, 48, 54, 56, 110, 154, 233]\nassert merge_sorted_list([1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12])==[1, 1, 2, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 11, 12]\nassert merge_sorted_list([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1],[25, 35, 22, 85, 14, 65, 75, 25, 58],[12, 74, 9, 50, 61, 41])==[1, 2, 3, 4, 7, 8, 9, 9, 9, 10, 12, 14, 14, 18, 22, 25, 25, 35, 41, 50, 58, 61, 65, 74, 75, 85]","source_id":"108","source_row_sha256":"327bc608d4faa80d9679433f096dc5dff09cb5d5c4116119d2dfc8b4bf81d6e5"},{"category":"Python","id":"mbpp-109","prompt":"Write a python function to find the count of rotations of a binary string with odd value.\n\nSource prompt examples:\nassert odd_Equivalent(\"011001\",6) == 3\nassert odd_Equivalent(\"11011\",5) == 4\nassert odd_Equivalent(\"1010\",4) == 2","source_id":"109","source_row_sha256":"235f4419a298c1270ad83afbcc8d74aebe7209fc15e79470e7f2a0531424f243"},{"category":"Python","id":"mbpp-11","prompt":"Write a python function to remove first and last occurrence of a given character from the string.\n\nSource prompt examples:\nassert remove_Occ(\"hello\",\"l\") == \"heo\"\nassert remove_Occ(\"abcda\",\"a\") == \"bcd\"\nassert remove_Occ(\"PHP\",\"P\") == \"H\"","source_id":"11","source_row_sha256":"21f4c81f340683cb411065916fd10b141d543993ed7a8c79a79e78b14ca56214"},{"category":"Python","id":"mbpp-110","prompt":"Write a function to extract the ranges that are missing from the given list with the given start range and end range values.\n\nSource prompt examples:\nassert extract_missing([(6, 9), (15, 34), (48, 70)], 2, 100) == [(2, 6), (9, 100), (9, 15), (34, 100), (34, 48), (70, 100)]\nassert extract_missing([(7, 2), (15, 19), (38, 50)], 5, 60) == [(5, 7), (2, 60), (2, 15), (19, 60), (19, 38), (50, 60)]\nassert extract_missing([(7, 2), (15, 19), (38, 50)], 1, 52) == [(1, 7), (2, 52), (2, 15), (19, 52), (19, 38), (50, 52)]","source_id":"110","source_row_sha256":"bf708cf0b9a0543c44a47d15519a30e13c1286d7597c08fef294188ec7d478e1"},{"category":"Python","id":"mbpp-111","prompt":"Write a function to find common elements in given nested lists. * list item * list item * list item * list item\n\nSource prompt examples:\nassert common_in_nested_lists([[12, 18, 23, 25, 45], [7, 12, 18, 24, 28], [1, 5, 8, 12, 15, 16, 18]])==[18, 12]\nassert common_in_nested_lists([[12, 5, 23, 25, 45], [7, 11, 5, 23, 28], [1, 5, 8, 18, 23, 16]])==[5,23]\nassert common_in_nested_lists([[2, 3,4, 1], [4, 5], [6,4, 8],[4, 5], [6, 8,4]])==[4]","source_id":"111","source_row_sha256":"8d40229578d23be4a10d0879abe722298d52069eecae0e390e0c45b657d028fb"},{"category":"Python","id":"mbpp-112","prompt":"Write a python function to find the perimeter of a cylinder.\n\nSource prompt examples:\nassert perimeter(2,4) == 12\nassert perimeter(1,2) == 6\nassert perimeter(3,1) == 8","source_id":"112","source_row_sha256":"dfe381595d8c22cac86ce89a79be3b33cdea9f69b67b012eb0bfe64e0f003efc"},{"category":"Python","id":"mbpp-113","prompt":"Write a function to check if a string represents an integer or not.\n\nSource prompt examples:\nassert check_integer(\"python\")==False\nassert check_integer(\"1\")==True\nassert check_integer(\"12345\")==True","source_id":"113","source_row_sha256":"5d64a22fdbc444fb06306465ce9eedcf131f79eea6f2e58959478bb43816b3be"},{"category":"Python","id":"mbpp-114","prompt":"Write a function to assign frequency to each tuple in the given tuple list.\n\nSource prompt examples:\nassert assign_freq([(6, 5, 8), (2, 7), (6, 5, 8), (6, 5, 8), (9, ), (2, 7)] ) == '[(6, 5, 8, 3), (2, 7, 2), (9, 1)]'\nassert assign_freq([(4, 2, 4), (7, 1), (4, 8), (4, 2, 4), (9, 2), (7, 1)] ) == '[(4, 2, 4, 2), (7, 1, 2), (4, 8, 1), (9, 2, 1)]'\nassert assign_freq([(11, 13, 10), (17, 21), (4, 2, 3), (17, 21), (9, 2), (4, 2, 3)] ) == '[(11, 13, 10, 1), (17, 21, 2), (4, 2, 3, 2), (9, 2, 1)]'","source_id":"114","source_row_sha256":"1e06328b36e1019a1acaa67b5df3bf7ea21f5a2eb196d632e0f132ef50883d8d"},{"category":"Python","id":"mbpp-115","prompt":"Write a function to check whether all dictionaries in a list are empty or not.\n\nSource prompt examples:\nassert empty_dit([{},{},{}])==True\nassert empty_dit([{1,2},{},{}])==False\nassert empty_dit({})==True","source_id":"115","source_row_sha256":"f52d420b2916d419b50fceb2393a8c5e6813e72acaef2f317a451253f20f8fcf"},{"category":"Python","id":"mbpp-116","prompt":"Write a function to convert a given tuple of positive integers into an integer.\n\nSource prompt examples:\nassert tuple_to_int((1,2,3))==123\nassert tuple_to_int((4,5,6))==456\nassert tuple_to_int((5,6,7))==567","source_id":"116","source_row_sha256":"3c5ece4b6572b17591652d932f9a9cc879056958e3b6dcf661e1049576ef0034"},{"category":"Python","id":"mbpp-117","prompt":"Write a function to convert all possible convertible elements in the list to float.\n\nSource prompt examples:\nassert list_to_float( [(\"3\", \"4\"), (\"1\", \"26.45\"), (\"7.32\", \"8\"), (\"4\", \"8\")] ) == '[(3.0, 4.0), (1.0, 26.45), (7.32, 8.0), (4.0, 8.0)]'\nassert list_to_float( [(\"4\", \"4\"), (\"2\", \"27\"), (\"4.12\", \"9\"), (\"7\", \"11\")] ) == '[(4.0, 4.0), (2.0, 27.0), (4.12, 9.0), (7.0, 11.0)]'\nassert list_to_float( [(\"6\", \"78\"), (\"5\", \"26.45\"), (\"1.33\", \"4\"), (\"82\", \"13\")] ) == '[(6.0, 78.0), (5.0, 26.45), (1.33, 4.0), (82.0, 13.0)]'","source_id":"117","source_row_sha256":"acbc2c80ed4a9a76bfba677bb11c80185ef7abd1c5df0524dc7ba56bd941c349"},{"category":"Python","id":"mbpp-118","prompt":"[link text](https:// [link text](https:// [link text](https://)))write a function to convert a string to a list.\n\nSource prompt examples:\nassert string_to_list(\"python programming\")==['python','programming']\nassert string_to_list(\"lists tuples strings\")==['lists','tuples','strings']\nassert string_to_list(\"write a program\")==['write','a','program']","source_id":"118","source_row_sha256":"328d41b89e660f4d25cdbc942112c2dceff19d614e10b55d70cbdf5ab7b5d6c3"},{"category":"Python","id":"mbpp-119","prompt":"Write a python function to find the element that appears only once in a sorted array.\n\nSource prompt examples:\nassert search([1,1,2,2,3],5) == 3\nassert search([1,1,3,3,4,4,5,5,7,7,8],11) == 8\nassert search([1,2,2,3,3,4,4],7) == 1","source_id":"119","source_row_sha256":"22ade1ec3b3a55a231444c8a19f82ffcc12abadca23da97c41c57f756946d345"},{"category":"Python","id":"mbpp-12","prompt":"Write a function to sort a given matrix in ascending order according to the sum of its rows.\n\nSource prompt examples:\nassert sort_matrix([[1, 2, 3], [2, 4, 5], [1, 1, 1]])==[[1, 1, 1], [1, 2, 3], [2, 4, 5]]\nassert sort_matrix([[1, 2, 3], [-2, 4, -5], [1, -1, 1]])==[[-2, 4, -5], [1, -1, 1], [1, 2, 3]]\nassert sort_matrix([[5,8,9],[6,4,3],[2,1,4]])==[[2, 1, 4], [6, 4, 3], [5, 8, 9]]","source_id":"12","source_row_sha256":"45031b34aaee0edd2fe170640de842026b08362b0be7fa4812b6663750ea0c3f"},{"category":"Python","id":"mbpp-120","prompt":"Write a function to find the maximum product from the pairs of tuples within a given list.\n\nSource prompt examples:\nassert max_product_tuple([(2, 7), (2, 6), (1, 8), (4, 9)] )==36\nassert max_product_tuple([(10,20), (15,2), (5,10)] )==200\nassert max_product_tuple([(11,44), (10,15), (20,5), (12, 9)] )==484","source_id":"120","source_row_sha256":"34e7b1e62cbe51e5778f24b9ce9468436808c77c8293db1ee1244164ed394207"},{"category":"Python","id":"mbpp-121","prompt":"Write a function to find the triplet with sum of the given array\n\nSource prompt examples:\nassert check_triplet([2, 7, 4, 0, 9, 5, 1, 3], 8, 6, 0) == True\nassert check_triplet([1, 4, 5, 6, 7, 8, 5, 9], 8, 6, 0) == False\nassert check_triplet([10, 4, 2, 3, 5], 5, 15, 0) == True","source_id":"121","source_row_sha256":"9d9bcfaf5bb3e7fd1e77ea0c5eda916f413c3212abcc939939ad1b8c0821f6be"},{"category":"Python","id":"mbpp-122","prompt":"Write a function to find n’th smart number.\n\nSource prompt examples:\nassert smartNumber(1) == 30\nassert smartNumber(50) == 273\nassert smartNumber(1000) == 2664","source_id":"122","source_row_sha256":"07e518fb2ac9dfecbf3d79890fbcff73180cdd342407c23defd0272a1d00648b"},{"category":"Python","id":"mbpp-123","prompt":"Write a function to sum all amicable numbers from 1 to a specified number.\n\nSource prompt examples:\nassert amicable_numbers_sum(999)==504\nassert amicable_numbers_sum(9999)==31626\nassert amicable_numbers_sum(99)==0","source_id":"123","source_row_sha256":"063190d50ef7b4c763f57060412a51d82ffe7eed4047fa7cc7ae08ff8bd37ed9"},{"category":"Python","id":"mbpp-124","prompt":"Write a function to get the angle of a complex number.\n\nSource prompt examples:\nassert angle_complex(0,1j)==1.5707963267948966 \nassert angle_complex(2,1j)==0.4636476090008061\nassert angle_complex(0,2j)==1.5707963267948966","source_id":"124","source_row_sha256":"f854a594072a741502da05895c578dc7cdf2ff95daa05a659bfbb0ae9cdd6a45"},{"category":"Python","id":"mbpp-125","prompt":"Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\n\nSource prompt examples:\nassert find_length(\"11000010001\", 11) == 6\nassert find_length(\"10111\", 5) == 1\nassert find_length(\"11011101100101\", 14) == 2 ","source_id":"125","source_row_sha256":"4856c51783cb5e7d542b5c10adfad523d7807ef931b41e4d53536af6bcdc792d"},{"category":"Python","id":"mbpp-126","prompt":"Write a python function to find the sum of common divisors of two given numbers.\n\nSource prompt examples:\nassert sum(10,15) == 6\nassert sum(100,150) == 93\nassert sum(4,6) == 3","source_id":"126","source_row_sha256":"2c68f4021783b8f2d44464936f44bd0bc44c13f7187399e6caa02132d53c5336"},{"category":"Python","id":"mbpp-127","prompt":"Write a function to multiply two integers without using the * operator in python.\n\nSource prompt examples:\nassert multiply_int(10,20)==200\nassert multiply_int(5,10)==50\nassert multiply_int(4,8)==32","source_id":"127","source_row_sha256":"c67e2dfe759420707f49d4071cb852ad8af72d802908900012db2610c92df96f"},{"category":"Python","id":"mbpp-128","prompt":"Write a function to shortlist words that are longer than n from a given list of words.\n\nSource prompt examples:\nassert long_words(3,\"python is a programming language\")==['python','programming','language']\nassert long_words(2,\"writing a program\")==['writing','program']\nassert long_words(5,\"sorting list\")==['sorting']","source_id":"128","source_row_sha256":"55e690361bb8ffc0a9ca41f616c99ec47ae914655c7725290b7b5e3ee4cfdbce"},{"category":"Python","id":"mbpp-129","prompt":"Write a function to calculate magic square.\n\nSource prompt examples:\nassert magic_square_test([[7, 12, 1, 14], [2, 13, 8, 11], [16, 3, 10, 5], [9, 6, 15, 4]])==True\nassert magic_square_test([[2, 7, 6], [9, 5, 1], [4, 3, 8]])==True\nassert magic_square_test([[2, 7, 6], [9, 5, 1], [4, 3, 7]])==False","source_id":"129","source_row_sha256":"87581acaa68ac76023e7ac4f3c6818e341d27e2e81ca24303c25f4110e2ef44a"},{"category":"Python","id":"mbpp-13","prompt":"Write a function to count the most common words in a dictionary.\n\nSource prompt examples:\nassert count_common(['red','green','black','pink','black','white','black','eyes','white','black','orange','pink','pink','red','red','white','orange','white',\"black\",'pink','green','green','pink','green','pink','white','orange',\"orange\",'red']) == [('pink', 6), ('black', 5), ('white', 5), ('red', 4)]\nassert count_common(['one', 'two', 'three', 'four', 'five', 'one', 'two', 'one', 'three', 'one']) == [('one', 4), ('two', 2), ('three', 2), ('four', 1)]\nassert count_common(['Facebook', 'Apple', 'Amazon', 'Netflix', 'Google', 'Apple', 'Netflix', 'Amazon']) == [('Apple', 2), ('Amazon', 2), ('Netflix', 2), ('Facebook', 1)]","source_id":"13","source_row_sha256":"c8c41f440c769c65772f707ec559a0a753890007639e830e198895addaa3466c"},{"category":"Python","id":"mbpp-130","prompt":"Write a function to find the item with maximum frequency in a given list.\n\nSource prompt examples:\nassert max_occurrences([2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2])==(2, 5)\nassert max_occurrences([2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18])==(8, 2)\nassert max_occurrences([10,20,20,30,40,90,80,50,30,20,50,10])==(20, 3)","source_id":"130","source_row_sha256":"c40181436ee5bfeb689cb8b0a01792089e323653d0cd7f58e7b69f20d35bdce8"},{"category":"Python","id":"mbpp-131","prompt":"Write a python function to reverse only the vowels of a given string.\n\nSource prompt examples:\nassert reverse_vowels(\"Python\") == \"Python\"\nassert reverse_vowels(\"USA\") == \"ASU\"\nassert reverse_vowels(\"ab\") == \"ab\"","source_id":"131","source_row_sha256":"804b551ef960e150638aa280715d23fdafccfaa6a956cfe972c488b09c5d7cc5"},{"category":"Python","id":"mbpp-132","prompt":"Write a function to convert tuple to a string.\n\nSource prompt examples:\nassert tup_string(('e', 'x', 'e', 'r', 'c', 'i', 's', 'e', 's'))==(\"exercises\")\nassert tup_string(('p','y','t','h','o','n'))==(\"python\")\nassert tup_string(('p','r','o','g','r','a','m'))==(\"program\")","source_id":"132","source_row_sha256":"9e8693fd10ba31ca2d11ff390539928ce107d0c8cfd8aa98b331fd432763660d"},{"category":"Python","id":"mbpp-133","prompt":"Write a function to calculate the sum of the negative numbers of a given list of numbers using lambda function.\n\nSource prompt examples:\nassert sum_negativenum([2, 4, -6, -9, 11, -12, 14, -5, 17])==-32\nassert sum_negativenum([10,15,-14,13,-18,12,-20])==-52\nassert sum_negativenum([19, -65, 57, 39, 152,-639, 121, 44, 90, -190])==-894","source_id":"133","source_row_sha256":"e67b04e700661b1bd5a7513c4fbc7e1eae9758f4a3bd5c11992cd1114bb8f72e"},{"category":"Python","id":"mbpp-134","prompt":"Write a python function to check whether the last element of given array is even or odd after performing an operation p times.\n\nSource prompt examples:\nassert check_last([5,7,10],3,1) == \"ODD\"\nassert check_last([2,3],2,3) == \"EVEN\"\nassert check_last([1,2,3],3,1) == \"ODD\"","source_id":"134","source_row_sha256":"af569075a0e1f2c4938b72d567329e59d67ba5d5d73459fbca7a8d6de68d1b19"},{"category":"Python","id":"mbpp-135","prompt":"Write a function to find the nth hexagonal number.\n\nSource prompt examples:\nassert hexagonal_num(10) == 190\nassert hexagonal_num(5) == 45\nassert hexagonal_num(7) == 91","source_id":"135","source_row_sha256":"8cae513271b4b4e3ab6ffc46f8cd5c0f28261205522b5ff128ddf36f3bbd2572"},{"category":"Python","id":"mbpp-136","prompt":"Write a function to calculate electricity bill.\n\nSource prompt examples:\nassert cal_electbill(75)==246.25\nassert cal_electbill(265)==1442.75\nassert cal_electbill(100)==327.5","source_id":"136","source_row_sha256":"4381ff5d925c2ec80e43e5388f69e4ba3669f880a0bc853dbea405af998b11a7"},{"category":"Python","id":"mbpp-137","prompt":"Write a function to find the ration of zeroes in an array of integers.\n\nSource prompt examples:\nassert zero_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.15\nassert zero_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.00\nassert zero_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.00","source_id":"137","source_row_sha256":"aea859ed55fe48adb921947c218a1110645b34f1d40ca71db54b8443b2d3bdea"},{"category":"Python","id":"mbpp-138","prompt":"Write a python function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\n\nSource prompt examples:\nassert is_Sum_Of_Powers_Of_Two(10) == True\nassert is_Sum_Of_Powers_Of_Two(7) == False\nassert is_Sum_Of_Powers_Of_Two(14) == True","source_id":"138","source_row_sha256":"2acb7efeaa0696b7ab1cc54a391f636df338876c450bdf8e54c9dc2288a0af4f"},{"category":"Python","id":"mbpp-139","prompt":"Write a function to find the circumference of a circle.\n\nSource prompt examples:\nassert circle_circumference(10)==62.830000000000005\nassert circle_circumference(5)==31.415000000000003\nassert circle_circumference(4)==25.132","source_id":"139","source_row_sha256":"2ba45b429da68a897ff33a5e21ad7fd89d32ec939cae5c91dccfdc88cdc9bc73"},{"category":"Python","id":"mbpp-14","prompt":"Write a python function to find the volume of a triangular prism.\n\nSource prompt examples:\nassert find_Volume(10,8,6) == 240\nassert find_Volume(3,2,2) == 6\nassert find_Volume(1,2,1) == 1","source_id":"14","source_row_sha256":"56d9481a3bf0f6a5766b4960d16c3e9671b1caabda0c4db675dc78345c29ba7d"},{"category":"Python","id":"mbpp-140","prompt":"Write a function to extract elements that occur singly in the given tuple list.\n\nSource prompt examples:\nassert extract_singly([(3, 4, 5), (4, 5, 7), (1, 4)]) == [3, 4, 5, 7, 1]\nassert extract_singly([(1, 2, 3), (4, 2, 3), (7, 8)]) == [1, 2, 3, 4, 7, 8]\nassert extract_singly([(7, 8, 9), (10, 11, 12), (10, 11)]) == [7, 8, 9, 10, 11, 12]","source_id":"140","source_row_sha256":"5950fef504df22418a59ca51fabb82320c4f021419917306ecf223a76fa8d33f"},{"category":"Python","id":"mbpp-141","prompt":"Write a function to sort a list of elements using pancake sort.\n\nSource prompt examples:\nassert pancake_sort([15, 79, 25, 38, 69]) == [15, 25, 38, 69, 79]\nassert pancake_sort([98, 12, 54, 36, 85]) == [12, 36, 54, 85, 98]\nassert pancake_sort([41, 42, 32, 12, 23]) == [12, 23, 32, 41, 42]","source_id":"141","source_row_sha256":"bdf259d50371cd7eca8ba2d106d08200cb6026f208efbaaa86ddae3256230cdf"},{"category":"Python","id":"mbpp-142","prompt":"Write a function to count the same pair in three given lists.\n\nSource prompt examples:\nassert count_samepair([1,2,3,4,5,6,7,8],[2,2,3,1,2,6,7,9],[2,1,3,1,2,6,7,9])==3\nassert count_samepair([1,2,3,4,5,6,7,8],[2,2,3,1,2,6,7,8],[2,1,3,1,2,6,7,8])==4\nassert count_samepair([1,2,3,4,2,6,7,8],[2,2,3,1,2,6,7,8],[2,1,3,1,2,6,7,8])==5","source_id":"142","source_row_sha256":"2cd06bdd751691b41e207c633ce93fac08a264a620266cdb866555d8cc1ff1f5"},{"category":"Python","id":"mbpp-143","prompt":"Write a function to find number of lists present in the given tuple.\n\nSource prompt examples:\nassert find_lists(([1, 2, 3, 4], [5, 6, 7, 8])) == 2\nassert find_lists(([1, 2], [3, 4], [5, 6]))  == 3\nassert find_lists(([9, 8, 7, 6, 5, 4, 3, 2, 1])) == 1","source_id":"143","source_row_sha256":"6633addd388743cc2635cefaeb26b6d9c12f86e5ebf3b088f9d13412ebaec58b"},{"category":"Python","id":"mbpp-144","prompt":"Write a python function to find the sum of absolute differences in all pairs of the given array.\n\nSource prompt examples:\nassert sum_Pairs([1,8,9,15,16],5) == 74\nassert sum_Pairs([1,2,3,4],4) == 10\nassert sum_Pairs([1,2,3,4,5,7,9,11,14],9) == 188","source_id":"144","source_row_sha256":"e9ad1c6963f58fd95093d7f68a7dcc9fb6541c3848eb3f58caceaad6dc0a383e"},{"category":"Python","id":"mbpp-145","prompt":"Write a python function to find the maximum difference between any two elements in a given array.\n\nSource prompt examples:\nassert max_Abs_Diff((2,1,5,3),4) == 4\nassert max_Abs_Diff((9,3,2,5,1),5) == 8\nassert max_Abs_Diff((3,2,1),3) == 2","source_id":"145","source_row_sha256":"b5ba5a1faf1764c02e353f8458d0fcea0a2163137353c7e01cbb91252fb02227"},{"category":"Python","id":"mbpp-146","prompt":"Write a function to find the ascii value of total characters in a string.\n\nSource prompt examples:\nassert ascii_value_string(\"python\")==112\nassert ascii_value_string(\"Program\")==80\nassert ascii_value_string(\"Language\")==76","source_id":"146","source_row_sha256":"8c2ee313f151167cfa75bf86838d496880c51332942b390033e3a6d3da6a8e3c"},{"category":"Python","id":"mbpp-147","prompt":"Write a function to find the maximum total path sum in the given triangle.\n\nSource prompt examples:\nassert max_path_sum([[1, 0, 0], [4, 8, 0], [1, 5, 3]], 2, 2) == 14\nassert max_path_sum([[13, 0, 0], [7, 4, 0], [2, 4, 6]], 2, 2) == 24 \nassert max_path_sum([[2, 0, 0], [11, 18, 0], [21, 25, 33]], 2, 2) == 53","source_id":"147","source_row_sha256":"1bb1ed0be3f7f84becfcdfbaf06716cbf22b813800a0532d4c4e3b0af515f848"},{"category":"Python","id":"mbpp-148","prompt":"Write a function to divide a number into two parts such that the sum of digits is maximum.\n\nSource prompt examples:\nassert sum_digits_twoparts(35)==17\nassert sum_digits_twoparts(7)==7\nassert sum_digits_twoparts(100)==19","source_id":"148","source_row_sha256":"1663f79910d986c6f2fe6fcc01cd05ad627ece9328a97c4d457b51ed7860a1c9"},{"category":"Python","id":"mbpp-149","prompt":"Write a function to find the longest subsequence such that the difference between adjacents is one for the given array.\n\nSource prompt examples:\nassert longest_subseq_with_diff_one([1, 2, 3, 4, 5, 3, 2], 7) == 6\nassert longest_subseq_with_diff_one([10, 9, 4, 5, 4, 8, 6], 7) == 3\nassert longest_subseq_with_diff_one([1, 2, 3, 2, 3, 7, 2, 1], 8) == 7","source_id":"149","source_row_sha256":"861f05652d91217165afd0c083a59fb78da805f08a987e079ff58093b6b8c08e"},{"category":"Python","id":"mbpp-15","prompt":"Write a function to split a string at lowercase letters.\n\nSource prompt examples:\nassert split_lowerstring(\"AbCd\")==['bC','d']\nassert split_lowerstring(\"Python\")==['y', 't', 'h', 'o', 'n']\nassert split_lowerstring(\"Programming\")==['r', 'o', 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g']","source_id":"15","source_row_sha256":"e7c11f87bca1399e6e2faabb3336b5bdd72c8416a5566b5e3ac51bdb64510662"},{"category":"Python","id":"mbpp-150","prompt":"Write a python function to find whether the given number is present in the infinite sequence or not.\n\nSource prompt examples:\nassert does_Contain_B(1,7,3) == True\nassert does_Contain_B(1,-3,5) == False\nassert does_Contain_B(3,2,5) == False","source_id":"150","source_row_sha256":"93089775f778fe2271fa2ba538ddfb1273f202148d742984e7b1e981dcf369cf"},{"category":"Python","id":"mbpp-151","prompt":"Write a python function to check whether the given number is co-prime or not.\n\nSource prompt examples:\nassert is_coprime(17,13) == True\nassert is_coprime(15,21) == False\nassert is_coprime(25,45) == False","source_id":"151","source_row_sha256":"fed2f5ea053457fd6b503d555da22d03bfe3e9789da57248540fbb0f1ccb519d"},{"category":"Python","id":"mbpp-152","prompt":"Write a function to sort the given array by using merge sort.\n\nSource prompt examples:\nassert merge_sort([3, 4, 2, 6, 5, 7, 1, 9]) == [1, 2, 3, 4, 5, 6, 7, 9]\nassert merge_sort([7, 25, 45, 78, 11, 33, 19]) == [7, 11, 19, 25, 33, 45, 78]\nassert merge_sort([3, 1, 4, 9, 8]) == [1, 3, 4, 8, 9]","source_id":"152","source_row_sha256":"830e66d0296b43d19871466070b2075c64c0b4b43dd1662064f3ca83970a8f2b"},{"category":"Python","id":"mbpp-153","prompt":"Write a function to find the vertex of a parabola.\n\nSource prompt examples:\nassert parabola_vertex(5,3,2)==(-0.3, 1.55)\nassert parabola_vertex(9,8,4)==(-0.4444444444444444, 2.2222222222222223)\nassert parabola_vertex(2,4,6)==(-1.0, 4.0)","source_id":"153","source_row_sha256":"0935a6775c620068d96767c4879fa25f60bb2debd2b4af57d0d888046c69f556"},{"category":"Python","id":"mbpp-154","prompt":"Write a function to extract every specified element from a given two dimensional list.\n\nSource prompt examples:\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],0)==[1, 4, 7]\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],2)==[3, 6, 9]\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],3)==[2,2,5]","source_id":"154","source_row_sha256":"f08d2b8714a3c7b35c682b07ac38d114474259d7ce6e9ec4c91ad276dff60b18"},{"category":"Python","id":"mbpp-155","prompt":"Write a python function to toggle all even bits of a given number.\n\nSource prompt examples:\nassert even_bit_toggle_number(10) == 0\nassert even_bit_toggle_number(20) == 30\nassert even_bit_toggle_number(30) == 20","source_id":"155","source_row_sha256":"385617d0d82932e877ed5cc79878d9ed87214b5cfaef7ca58e0c640d24be77a3"},{"category":"Python","id":"mbpp-156","prompt":"Write a function to convert a tuple of string values to a tuple of integer values.\n\nSource prompt examples:\nassert tuple_int_str((('333', '33'), ('1416', '55')))==((333, 33), (1416, 55))\nassert tuple_int_str((('999', '99'), ('1000', '500')))==((999, 99), (1000, 500))\nassert tuple_int_str((('666', '66'), ('1500', '555')))==((666, 66), (1500, 555))","source_id":"156","source_row_sha256":"d00a8199bd560d63105823ef9ec0b825f713c915f6fe3889a60500334446476a"},{"category":"Python","id":"mbpp-157","prompt":"Write a function to reflect the run-length encoding from a list.\n\nSource prompt examples:\nassert encode_list([1,1,2,3,4,4.3,5,1])==[[2, 1], [1, 2], [1, 3], [1, 4], [1, 4.3], [1, 5], [1, 1]]\nassert encode_list('automatically')==[[1, 'a'], [1, 'u'], [1, 't'], [1, 'o'], [1, 'm'], [1, 'a'], [1, 't'], [1, 'i'], [1, 'c'], [1, 'a'], [2, 'l'], [1, 'y']]\nassert encode_list('python')==[[1, 'p'], [1, 'y'], [1, 't'], [1, 'h'], [1, 'o'], [1, 'n']]","source_id":"157","source_row_sha256":"a98aa8f332c0d221186362310308d9cf44613e1a3f2340c52d95ca4806551a84"},{"category":"Python","id":"mbpp-158","prompt":"Write a python function to find k number of operations required to make all elements equal.\n\nSource prompt examples:\nassert min_Ops([2,2,2,2],4,3) == 0\nassert min_Ops([4,2,6,8],4,3) == -1\nassert min_Ops([21,33,9,45,63],5,6) == 24","source_id":"158","source_row_sha256":"9248cf02154ae0f40b31681706fbf1eeb1d9815da4b8e1944d866ea915305d3d"},{"category":"Python","id":"mbpp-159","prompt":"Write a function to print the season for the given month and day.\n\nSource prompt examples:\nassert month_season('January',4)==('winter')\nassert month_season('October',28)==('autumn')\nassert month_season('June',6)==('spring')","source_id":"159","source_row_sha256":"f68aa7192c96ba884e46a4586a986c71a7327100f5d97ddec9fec9b2bd1dd797"},{"category":"Python","id":"mbpp-16","prompt":"Write a function to find sequences of lowercase letters joined with an underscore.\n\nSource prompt examples:\nassert text_lowercase_underscore(\"aab_cbbbc\")==('Found a match!')\nassert text_lowercase_underscore(\"aab_Abbbc\")==('Not matched!')\nassert text_lowercase_underscore(\"Aaab_abbbc\")==('Not matched!')","source_id":"16","source_row_sha256":"7e30d71ee6cb27137ac7aa06e7338ef129e154da37a18d4c5d5b7c665db755b4"},{"category":"Python","id":"mbpp-160","prompt":"Write a function to find x and y that satisfies ax + by = n.\n\nSource prompt examples:\nassert solution(2, 3, 7) == ('x = ', 2, ', y = ', 1)\nassert solution(4, 2, 7) == 'No solution'\nassert solution(1, 13, 17) == ('x = ', 4, ', y = ', 1)","source_id":"160","source_row_sha256":"b36171a22cafc55429f1c4634aab64e3aad949fb0f26030a34254492b0c2ea4a"},{"category":"Python","id":"mbpp-161","prompt":"Write a function to remove all elements from a given list present in another list.\n\nSource prompt examples:\nassert remove_elements([1,2,3,4,5,6,7,8,9,10],[2,4,6,8])==[1, 3, 5, 7, 9, 10]\nassert remove_elements([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],[1, 3, 5, 7])==[2, 4, 6, 8, 9, 10]\nassert remove_elements([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],[5,7])==[1, 2, 3, 4, 6, 8, 9, 10]","source_id":"161","source_row_sha256":"df8295413399bb0f66c0c01912d5b35a51381f2736f586a20a133f629c73eefa"},{"category":"Python","id":"mbpp-162","prompt":"Write a function to calculate the sum of the positive integers of n+(n-2)+(n-4)... (until n-x =< 0).\n\nSource prompt examples:\nassert sum_series(6)==12\nassert sum_series(10)==30\nassert sum_series(9)==25","source_id":"162","source_row_sha256":"6cc7169c0a39038e4bb4bc7836cf67815cfc0352364a5ce582e35855889cdc9c"},{"category":"Python","id":"mbpp-163","prompt":"Write a function to calculate the area of a regular polygon.\n\nSource prompt examples:\nassert area_polygon(4,20)==400.00000000000006\nassert area_polygon(10,15)==1731.1969896610804\nassert area_polygon(9,7)==302.90938549487214","source_id":"163","source_row_sha256":"0b719acd2fb192ef8ff53e2c234a19246e8080b2b8a1e4f277e7c15b14a45f77"},{"category":"Python","id":"mbpp-164","prompt":"Write a python function to check whether the sum of divisors are same or not.\n\nSource prompt examples:\nassert areEquivalent(36,57) == False\nassert areEquivalent(2,4) == False\nassert areEquivalent(23,47) == True","source_id":"164","source_row_sha256":"dade9bd44a7251f23a98278d17689a60e3cf296de52d13ffb75cb9764a2ae21d"},{"category":"Python","id":"mbpp-165","prompt":"Write a python function to count characters at same position in a given string (lower and uppercase characters) as in english alphabet.\n\nSource prompt examples:\nassert count_char_position(\"xbcefg\") == 2\nassert count_char_position(\"ABcED\") == 3\nassert count_char_position(\"AbgdeF\") == 5","source_id":"165","source_row_sha256":"2a06367552feb15a09645d3b5d57083356207422d00ab21b14b6aef373a60f0b"},{"category":"Python","id":"mbpp-166","prompt":"Write a python function to count the pairs with xor as an even number.\n\nSource prompt examples:\nassert find_even_Pair([5,4,7,2,1],5) == 4\nassert find_even_Pair([7,2,8,1,0,5,11],7) == 9\nassert find_even_Pair([1,2,3],3) == 1","source_id":"166","source_row_sha256":"8f2c2ee63291bf2de6dd1e4f70da381b1093309473e607197ff80236b7359251"},{"category":"Python","id":"mbpp-167","prompt":"Write a python function to find smallest power of 2 greater than or equal to n.\n\nSource prompt examples:\nassert next_Power_Of_2(0) == 1\nassert next_Power_Of_2(5) == 8\nassert next_Power_Of_2(17) == 32","source_id":"167","source_row_sha256":"d2bebe6acf90718d066b59074548f95151b91a0cbcf5956b455f3ffec46800d0"},{"category":"Python","id":"mbpp-168","prompt":"Write a python function to find the frequency of a number in a given array.\n\nSource prompt examples:\nassert frequency([1,2,3],4) == 0\nassert frequency([1,2,2,3,3,3,4],3) == 3\nassert frequency([0,1,2,3,1,2],1) == 2","source_id":"168","source_row_sha256":"b83f4779361ce35c21b73ca32cccaf5f4e15cbf141cdef9915c762da53a02dcd"},{"category":"Python","id":"mbpp-169","prompt":"Write a function to calculate the nth pell number.\n\nSource prompt examples:\nassert get_pell(4) == 12\nassert get_pell(7) == 169\nassert get_pell(8) == 408","source_id":"169","source_row_sha256":"ec9cb4284b41c35c86a1642429dda4c185321896e772e3100846da56fe050d69"},{"category":"Python","id":"mbpp-17","prompt":"Write a function to find the perimeter of a square.\n\nSource prompt examples:\nassert square_perimeter(10)==40\nassert square_perimeter(5)==20\nassert square_perimeter(4)==16","source_id":"17","source_row_sha256":"3da2c9161a7dd2431bc3df6c8624bf75a8a1848dd08582948dd62a7e200dfade"},{"category":"Python","id":"mbpp-170","prompt":"Write a function to find sum of the numbers in a list between the indices of a specified range.\n\nSource prompt examples:\nassert sum_range_list( [2,1,5,6,8,3,4,9,10,11,8,12],8,10)==29\nassert sum_range_list( [2,1,5,6,8,3,4,9,10,11,8,12],5,7)==16\nassert sum_range_list( [2,1,5,6,8,3,4,9,10,11,8,12],7,10)==38","source_id":"170","source_row_sha256":"1c8d0762672f3da31cf5b111a009a802fa8b02927fe432c6ac057376bbeff602"},{"category":"Python","id":"mbpp-171","prompt":"Write a function to find the perimeter of a pentagon.\n\nSource prompt examples:\nassert perimeter_pentagon(5)==25\nassert perimeter_pentagon(10)==50\nassert perimeter_pentagon(15)==75","source_id":"171","source_row_sha256":"bb24a7f781c85453e4ff88a1ad0ac9adc955b70d3c11f58a997eb4cad30755d6"},{"category":"Python","id":"mbpp-172","prompt":"Write a function to find the occurence of characters 'std' in the given string 1. list item 1. list item 1. list item 2. list item 2. list item 2. list item\n\nSource prompt examples:\nassert count_occurance(\"letstdlenstdporstd\") == 3\nassert count_occurance(\"truststdsolensporsd\") == 1\nassert count_occurance(\"makestdsostdworthit\") == 2","source_id":"172","source_row_sha256":"29c9b294013bd2e218dc073a72fe3decfb7e00bd78124662bc24c78dd3653c23"},{"category":"Python","id":"mbpp-173","prompt":"Write a function to remove everything except alphanumeric characters from a string.\n\nSource prompt examples:\nassert remove_splchar('python  @#&^%$*program123')==('pythonprogram123')\nassert remove_splchar('python %^$@!^&*()  programming24%$^^()    language')==('pythonprogramming24language')\nassert remove_splchar('python   ^%&^()(+_)(_^&67)                  program')==('python67program')","source_id":"173","source_row_sha256":"7e8da24fd4f5bf3c832d6e09db7b2b8843550b6c2b3dce6ba764ddeafc28cc35"},{"category":"Python","id":"mbpp-174","prompt":"Write a function to group a sequence of key-value pairs into a dictionary of lists.\n\nSource prompt examples:\nassert group_keyvalue([('yellow', 1), ('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)])=={'yellow': [1, 3], 'blue': [2, 4], 'red': [1]}\nassert group_keyvalue([('python', 1), ('python', 2), ('python', 3), ('python', 4), ('python', 5)])=={'python': [1,2,3,4,5]}\nassert group_keyvalue([('yellow',100), ('blue', 200), ('yellow', 300), ('blue', 400), ('red', 100)])=={'yellow': [100, 300], 'blue': [200, 400], 'red': [100]}","source_id":"174","source_row_sha256":"1e0308f8b8b08b8eb8332396ba99b42a8e8121186eb2bee8cb50f7cf59780f76"},{"category":"Python","id":"mbpp-175","prompt":"Write a function to verify validity of a string of parentheses.\n\nSource prompt examples:\nassert is_valid_parenthese(\"(){}[]\")==True\nassert is_valid_parenthese(\"()[{)}\")==False\nassert is_valid_parenthese(\"()\")==True","source_id":"175","source_row_sha256":"c2de70f16b70297c4b9aaadd8585801dff621367b4e7c137c006f292c4c4ddc1"},{"category":"Python","id":"mbpp-176","prompt":"Write a function to find the perimeter of a triangle.\n\nSource prompt examples:\nassert perimeter_triangle(10,20,30)==60\nassert perimeter_triangle(3,4,5)==12\nassert perimeter_triangle(25,35,45)==105","source_id":"176","source_row_sha256":"65d40c7f0abb9a9a7004afa79c19851e87fac6dbb5b1a9dc4decd5ceabe09d11"},{"category":"Python","id":"mbpp-177","prompt":"Write a python function to find two distinct numbers such that their lcm lies within the given range.\n\nSource prompt examples:\nassert answer(3,8) == (3,6)\nassert answer(2,6) == (2,4)\nassert answer(1,3) == (1,2)","source_id":"177","source_row_sha256":"7eff1493b0ee0e4b0c759d94e9c44ca8f24de772d45c51df41053243b72467de"},{"category":"Python","id":"mbpp-178","prompt":"Write a function to search some literals strings in a string.\n\nSource prompt examples:\nassert string_literals(['language'],'python language')==('Matched!')\nassert string_literals(['program'],'python language')==('Not Matched!')\nassert string_literals(['python'],'programming language')==('Not Matched!')","source_id":"178","source_row_sha256":"089886c5dd468d66115e0a09eeb6a4acd761dce79c149aadfb28bcbe6b53b1ea"},{"category":"Python","id":"mbpp-179","prompt":"Write a function to find if the given number is a keith number or not.\n\nSource prompt examples:\nassert is_num_keith(14) == True\nassert is_num_keith(12) == False\nassert is_num_keith(197) == True","source_id":"179","source_row_sha256":"9b4535c47f6ac4f94faef3fb543b32cf149d5a04a01cb9926c58e8c21691c30b"},{"category":"Python","id":"mbpp-18","prompt":"Write a function to remove characters from the first string which are present in the second string.\n\nSource prompt examples:\nassert remove_dirty_chars(\"probasscurve\", \"pros\") == 'bacuve'\nassert remove_dirty_chars(\"digitalindia\", \"talent\") == 'digiidi'\nassert remove_dirty_chars(\"exoticmiles\", \"toxic\") == 'emles' ","source_id":"18","source_row_sha256":"57423597a516d96d4a33a5a4c775db0f2913ad95a570c90c4735d274d0dc8b72"},{"category":"Python","id":"mbpp-180","prompt":"Write a function to calculate distance between two points using latitude and longitude.\n\nSource prompt examples:\nassert distance_lat_long(23.5,67.5,25.5,69.5)==12179.372041317429\nassert distance_lat_long(10.5,20.5,30.5,40.5)==6069.397933300514\nassert distance_lat_long(10,20,30,40)==6783.751974994595","source_id":"180","source_row_sha256":"0fa281a681da2538ef612c2e73794982e2d7a2b7b77f05731151ffdab919b7d5"},{"category":"Python","id":"mbpp-181","prompt":"Write a function to find the longest common prefix in the given set of strings.\n\nSource prompt examples:\nassert common_prefix([\"tablets\", \"tables\", \"taxi\", \"tamarind\"], 4) == 'ta'\nassert common_prefix([\"apples\", \"ape\", \"april\"], 3) == 'ap'\nassert common_prefix([\"teens\", \"teenager\", \"teenmar\"], 3) == 'teen'","source_id":"181","source_row_sha256":"df45e06a5029450af14a7bc26759329b81bd823ee89c6d26ef7e56c23af01952"},{"category":"Python","id":"mbpp-182","prompt":"Write a function to find uppercase, lowercase, special character and numeric values using regex.\n\nSource prompt examples:\nassert find_character(\"ThisIsGeeksforGeeks\") == (['T', 'I', 'G', 'G'], ['h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'], [], [])\nassert find_character(\"Hithere2\") == (['H'], ['i', 't', 'h', 'e', 'r', 'e'], ['2'], [])\nassert find_character(\"HeyFolks32\") == (['H', 'F'], ['e', 'y', 'o', 'l', 'k', 's'], ['3', '2'], [])","source_id":"182","source_row_sha256":"d3f0009a380768221e1a6903fd766b3954f44b3ed1d05d0349259790cc315a17"},{"category":"Python","id":"mbpp-183","prompt":"Write a function to count all the distinct pairs having a difference of k in any array.\n\nSource prompt examples:\nassert count_pairs([1, 5, 3, 4, 2], 5, 3) == 2\nassert count_pairs([8, 12, 16, 4, 0, 20], 6, 4) == 5\nassert count_pairs([2, 4, 1, 3, 4], 5, 2) == 3","source_id":"183","source_row_sha256":"3932f47b8addbc667c8052c83d6832533bd2ad77fb1419eb132a98fb8af82410"},{"category":"Python","id":"mbpp-184","prompt":"Write a function to find all the values in a list that are greater than a specified number.\n\nSource prompt examples:\nassert greater_specificnum([220, 330, 500],200)==True\nassert greater_specificnum([12, 17, 21],20)==False\nassert greater_specificnum([1,2,3,4],10)==False","source_id":"184","source_row_sha256":"c1bca39dd55de4e1cd1278d2cf498e2bead991f5ab5b8cddf594e17552da42b0"},{"category":"Python","id":"mbpp-185","prompt":"Write a function to find the focus of a parabola.\n\nSource prompt examples:\nassert parabola_focus(5,3,2)==(-0.3, 1.6)\nassert parabola_focus(9,8,4)==(-0.4444444444444444, 2.25)\nassert parabola_focus(2,4,6)==(-1.0, 4.125)","source_id":"185","source_row_sha256":"54367a9585e39b1ff8333d56ccb31920be23fe98721688a3da6162fac314c80e"},{"category":"Python","id":"mbpp-186","prompt":"Write a function to search some literals strings in a string by using regex.\n\nSource prompt examples:\nassert check_literals('The quick brown fox jumps over the lazy dog.',['fox']) == 'Matched!'\nassert check_literals('The quick brown fox jumps over the lazy dog.',['horse']) == 'Not Matched!'\nassert check_literals('The quick brown fox jumps over the lazy dog.',['lazy']) == 'Matched!'","source_id":"186","source_row_sha256":"cccbd977973ecd53f540a2b468a8bb5cc3db670158893ab75763c65f3cdf421f"},{"category":"Python","id":"mbpp-187","prompt":"Write a function to find the longest common subsequence for the given two sequences.\n\nSource prompt examples:\nassert longest_common_subsequence(\"AGGTAB\" , \"GXTXAYB\", 6, 7) == 4\nassert longest_common_subsequence(\"ABCDGH\" , \"AEDFHR\", 6, 6) == 3\nassert longest_common_subsequence(\"AXYT\" , \"AYZX\", 4, 4) == 2","source_id":"187","source_row_sha256":"b69507ea5c982240b2368753cb2f548d38522f992c8423545b4d88277f346d99"},{"category":"Python","id":"mbpp-188","prompt":"Write a python function to check whether the given number can be represented by product of two squares or not.\n\nSource prompt examples:\nassert prod_Square(25) == False\nassert prod_Square(30) == False\nassert prod_Square(16) == True","source_id":"188","source_row_sha256":"7640bb98e7b63b4caba915762781675ebe9e957bd0f16d8e7cd4c56f4954817d"},{"category":"Python","id":"mbpp-189","prompt":"Write a python function to find the first missing positive number.\n\nSource prompt examples:\nassert first_Missing_Positive([1,2,3,-1,5],5) == 4\nassert first_Missing_Positive([0,-1,-2,1,5,8],6) == 2\nassert first_Missing_Positive([0,1,2,5,-8],5) == 3","source_id":"189","source_row_sha256":"a819ff13633fd272918c9e6a28611fc559bdd157d2c393d1a46cabfe18a5cb2a"},{"category":"Python","id":"mbpp-19","prompt":"Write a function to find whether a given array of integers contains any duplicate element.\n\nSource prompt examples:\nassert test_duplicate(([1,2,3,4,5]))==False\nassert test_duplicate(([1,2,3,4, 4]))==True\nassert test_duplicate([1,1,2,2,3,3,4,4,5])==True","source_id":"19","source_row_sha256":"8320b8fa8ce13ea452664f8c37821f019c3bda4e239976b5dc92242e5b613edf"},{"category":"Python","id":"mbpp-190","prompt":"Write a python function to count the number of integral co-ordinates that lie inside a square.\n\nSource prompt examples:\nassert count_Intgral_Points(1,1,4,4) == 4\nassert count_Intgral_Points(1,2,1,2) == 1\nassert count_Intgral_Points(4,2,6,4) == 1","source_id":"190","source_row_sha256":"d04fb9ded8ec1e603f508ad6dcdb361a71d86afdf696cf9751adad5087b76f1d"},{"category":"Python","id":"mbpp-191","prompt":"Write a function to check whether the given month name contains 30 days or not.\n\nSource prompt examples:\nassert check_monthnumber(\"February\")==False\nassert check_monthnumber(\"June\")==True\nassert check_monthnumber(\"April\")==True","source_id":"191","source_row_sha256":"71d75744502ba89069569388354fd3fcd5939b9e6b824d91dbe0220d665dba7a"},{"category":"Python","id":"mbpp-192","prompt":"Write a python function to check whether a string has atleast one letter and one number.\n\nSource prompt examples:\nassert check_String('thishasboth29') == True\nassert check_String('python') == False\nassert check_String ('string') == False","source_id":"192","source_row_sha256":"1a94620767948491dfd63f70d966aee882aa6b7f0b26d50028b4d3f8523d1c19"},{"category":"Python","id":"mbpp-193","prompt":"Write a function to remove the duplicates from the given tuple.\n\nSource prompt examples:\nassert remove_tuple((1, 3, 5, 2, 3, 5, 1, 1, 3)) == (1, 2, 3, 5)\nassert remove_tuple((2, 3, 4, 4, 5, 6, 6, 7, 8, 8)) == (2, 3, 4, 5, 6, 7, 8)\nassert remove_tuple((11, 12, 13, 11, 11, 12, 14, 13)) == (11, 12, 13, 14)","source_id":"193","source_row_sha256":"c1d88b384f5666abda90fc954a9d3633a105f9d280caaf5532c6377306987a51"},{"category":"Python","id":"mbpp-194","prompt":"Write a python function to convert octal number to decimal number.\n\nSource prompt examples:\nassert octal_To_Decimal(25) == 21\nassert octal_To_Decimal(30) == 24\nassert octal_To_Decimal(40) == 32","source_id":"194","source_row_sha256":"09e5836e2877815f9288040ede264dc4e03a957c386eff67cc2f7ce2a752f95d"},{"category":"Python","id":"mbpp-195","prompt":"Write a python function to find the first position of an element in a sorted array.\n\nSource prompt examples:\nassert first([1,2,3,4,5,6,6],6,6) == 5\nassert first([1,2,2,2,3,2,2,4,2],2,9) == 1\nassert first([1,2,3],1,3) == 0","source_id":"195","source_row_sha256":"b76bee80d621b45a164648ed555cd0df3a051c096cc7e54029e0d257ea2ab735"},{"category":"Python","id":"mbpp-196","prompt":"Write a function to remove all the tuples with length k.\n\nSource prompt examples:\nassert remove_tuples([(4, 5), (4, ), (8, 6, 7), (1, ), (3, 4, 6, 7)] , 1) == [(4, 5), (8, 6, 7), (3, 4, 6, 7)]\nassert remove_tuples([(4, 5), (4,5), (6, 7), (1, 2, 3), (3, 4, 6, 7)] ,2) == [(1, 2, 3), (3, 4, 6, 7)]\nassert remove_tuples([(1, 4, 4), (4, 3), (8, 6, 7), (1, ), (3, 6, 7)] , 3) == [(4, 3), (1,)]","source_id":"196","source_row_sha256":"e676ca3b9bad36e8a4777a6cb58c67226e766ee6dd0446745e9b69dafeec445c"},{"category":"Python","id":"mbpp-197","prompt":"Write a function to perform the exponentiation of the given two tuples.\n\nSource prompt examples:\nassert find_exponentio((10, 4, 5, 6), (5, 6, 7, 5)) == (100000, 4096, 78125, 7776)\nassert find_exponentio((11, 5, 6, 7), (6, 7, 8, 6)) == (1771561, 78125, 1679616, 117649)\nassert find_exponentio((12, 6, 7, 8), (7, 8, 9, 7)) == (35831808, 1679616, 40353607, 2097152)","source_id":"197","source_row_sha256":"5ddb184b247f44350b7bdc4af3032c301e68fb4e76a0a42de03406a7424569c6"},{"category":"Python","id":"mbpp-198","prompt":"Write a function to find the largest triangle that can be inscribed in an ellipse.\n\nSource prompt examples:\nassert largest_triangle(4,2)==10.392304845413264\nassert largest_triangle(5,7)==4.639421805988064\nassert largest_triangle(9,1)==105.2220865598093","source_id":"198","source_row_sha256":"68e4f5f51835b10c2756d704401d7354e9fbe14b4c699a54e9db28ebe7ec5735"},{"category":"Python","id":"mbpp-199","prompt":"Write a python function to find highest power of 2 less than or equal to given number.\n\nSource prompt examples:\nassert highest_Power_of_2(10) == 8\nassert highest_Power_of_2(19) == 16\nassert highest_Power_of_2(32) == 32","source_id":"199","source_row_sha256":"145153611e47b262c6d23ad1ca5587fef6e51ee1d4f7b6843c35787f279e43fa"},{"category":"Python","id":"mbpp-20","prompt":"Write a function to check if the given number is woodball or not.\n\nSource prompt examples:\nassert is_woodall(383) == True\nassert is_woodall(254) == False\nassert is_woodall(200) == False","source_id":"20","source_row_sha256":"f2538f51a1679f2432c76d9d3c4db7407bd8ccb10d2ba77e3d9564db5d016692"},{"category":"Python","id":"mbpp-200","prompt":"Write a function to find all index positions of the maximum values in a given list.\n\nSource prompt examples:\nassert position_max([12,33,23,10,67,89,45,667,23,12,11,10,54])==[7]\nassert position_max([1,2,2,2,4,4,4,5,5,5,5])==[7,8,9,10]\nassert position_max([2,1,5,6,8,3,4,9,10,11,8,12])==[11]","source_id":"200","source_row_sha256":"6319dee4bdd523681479d97496ed71e501d04b4243c2b449880064acace76f3f"},{"category":"Python","id":"mbpp-201","prompt":"Write a python function to check whether the elements in a list are same or not.\n\nSource prompt examples:\nassert chkList(['one','one','one']) == True\nassert chkList(['one','Two','Three']) == False\nassert chkList(['bigdata','python','Django']) == False","source_id":"201","source_row_sha256":"e7b7509276cbb0eae05b949c95b76b2e54120341dd2d511c58ae7f74407ad3e1"},{"category":"Python","id":"mbpp-202","prompt":"Write a function to remove even characters in a string.\n\nSource prompt examples:\nassert remove_even(\"python\")==(\"pto\")\nassert remove_even(\"program\")==(\"porm\")\nassert remove_even(\"language\")==(\"lnug\")","source_id":"202","source_row_sha256":"f58ce6858c25d39793da7430da4442ed629b2aeaa0e6f283e699ee0d7c5d2606"},{"category":"Python","id":"mbpp-203","prompt":"Write a python function to find the hamming distance between given two integers.\n\nSource prompt examples:\nassert hamming_Distance(4,8) == 2\nassert hamming_Distance(2,4) == 2\nassert hamming_Distance(1,2) == 2","source_id":"203","source_row_sha256":"12a10cc1d073e60be00682a969ac137ef47bf137eaa94393b6b1be560dbf1c55"},{"category":"Python","id":"mbpp-204","prompt":"Write a python function to count the occurrence of a given character in a string.\n\nSource prompt examples:\nassert count(\"abcc\",\"c\") == 2\nassert count(\"ababca\",\"a\") == 3\nassert count(\"mnmm0pm\",\"m\") == 4","source_id":"204","source_row_sha256":"bd53dcff9938eef1b094d0dab58cd41c107bf59f08a762e5b8a5ef2c2eb0a938"},{"category":"Python","id":"mbpp-205","prompt":"Write a function to find the inversions of tuple elements in the given tuple list.\n\nSource prompt examples:\nassert inversion_elements((7, 8, 9, 1, 10, 7)) == (-8, -9, -10, -2, -11, -8)\nassert inversion_elements((2, 4, 5, 6, 1, 7)) == (-3, -5, -6, -7, -2, -8)\nassert inversion_elements((8, 9, 11, 14, 12, 13)) == (-9, -10, -12, -15, -13, -14)","source_id":"205","source_row_sha256":"bcc432533171ade8104d2067bcc0a0164382f5bac508c701daa09a7d41d95c36"},{"category":"Python","id":"mbpp-206","prompt":"Write a function to perform the adjacent element concatenation in the given tuples.\n\nSource prompt examples:\nassert concatenate_elements((\"DSP \", \"IS \", \"BEST \", \"FOR \", \"ALL \", \"UTS\")) == ('DSP IS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL UTS')\nassert concatenate_elements((\"RES \", \"IS \", \"BEST \", \"FOR \", \"ALL \", \"QESR\")) == ('RES IS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL QESR')\nassert concatenate_elements((\"MSAM\", \"IS \", \"BEST \", \"FOR \", \"ALL \", \"SKD\")) == ('MSAMIS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL SKD')","source_id":"206","source_row_sha256":"455bb6fdb36858d85b1307a905eafce0ceda48573c47f063ced74cd11c2a4f1f"},{"category":"Python","id":"mbpp-207","prompt":"Write a function to count the longest repeating subsequences such that the two subsequences don’t have same string characters at same positions.\n\nSource prompt examples:\nassert find_longest_repeating_subseq(\"AABEBCDD\") == 3\nassert find_longest_repeating_subseq(\"aabb\") == 2\nassert find_longest_repeating_subseq(\"aab\") == 1","source_id":"207","source_row_sha256":"27522fb9338780309b0f3cd8d058903b1361f03461ed1000ab1cc71cb991c5f2"},{"category":"Python","id":"mbpp-208","prompt":"Write a function to check the given decimal with a precision of 2 by using regex.\n\nSource prompt examples:\nassert is_decimal('123.11') == True\nassert is_decimal('0.21') == True\nassert is_decimal('123.1214') == False","source_id":"208","source_row_sha256":"2ae7d948a75c41aea535766abd3917ccd6cbb36ea38e88025fb7bab7254e4594"},{"category":"Python","id":"mbpp-209","prompt":"Write a function to delete the smallest element from the given heap and then insert a new item.\n\nSource prompt examples:\nassert heap_replace( [25, 44, 68, 21, 39, 23, 89],21)==[21, 25, 23, 44, 39, 68, 89]\nassert heap_replace([25, 44, 68, 21, 39, 23, 89],110)== [23, 25, 68, 44, 39, 110, 89]\nassert heap_replace([25, 44, 68, 21, 39, 23, 89],500)==[23, 25, 68, 44, 39, 500, 89]","source_id":"209","source_row_sha256":"f3112e2c2bafae7f6128afdb5175d7701612fd910d0115de6d855d3a776a2371"},{"category":"Python","id":"mbpp-21","prompt":"Write a function to find m number of multiples of n.\n\nSource prompt examples:\nassert multiples_of_num(4,3)== [3,6,9,12]\nassert multiples_of_num(2,5)== [5,10]\nassert multiples_of_num(9,2)== [2,4,6,8,10,12,14,16,18]","source_id":"21","source_row_sha256":"34808ede643a5a7fdecbdb0d3d738633c89914580553e7f4f2b692a9024c7d2a"},{"category":"Python","id":"mbpp-210","prompt":"Write a function to check that the given string contains only a certain set of characters(in this case a-z, a-z and 0-9) by using regex.\n\nSource prompt examples:\nassert is_allowed_specific_char(\"ABCDEFabcdef123450\") == True\nassert is_allowed_specific_char(\"*&%@#!}{\") == False\nassert is_allowed_specific_char(\"HELLOhowareyou98765\") == True","source_id":"210","source_row_sha256":"fbc854077721a8da113ac557c0e7d4c6b442f3833f19118fd748d47a6f96dbff"},{"category":"Python","id":"mbpp-211","prompt":"Write a python function to count numbers whose oth and nth bits are set.\n\nSource prompt examples:\nassert count_Num(2) == 1\nassert count_Num(3) == 2\nassert count_Num(1) == 1","source_id":"211","source_row_sha256":"3a2e994b2018072850334ad0fafa4eb552484e5e1d03e2d9244c4dfd0d9f6975"},{"category":"Python","id":"mbpp-212","prompt":"Write a python function to find the sum of fourth power of n natural numbers.\n\nSource prompt examples:\nassert fourth_Power_Sum(2) == 17\nassert fourth_Power_Sum(4) == 354\nassert fourth_Power_Sum(6) == 2275","source_id":"212","source_row_sha256":"21384ab9560c8c445b06cfe7ba53dffa25a9cb2389571d14cac851ea2bf9693a"},{"category":"Python","id":"mbpp-213","prompt":"Write a function to perform the concatenation of two string tuples.\n\nSource prompt examples:\nassert concatenate_strings((\"Manjeet\", \"Nikhil\", \"Akshat\"), (\" Singh\", \" Meherwal\", \" Garg\")) == ('Manjeet Singh', 'Nikhil Meherwal', 'Akshat Garg')\nassert concatenate_strings((\"Shaik\", \"Ayesha\", \"Sanya\"), (\" Dawood\", \" Begum\", \" Singh\")) == ('Shaik Dawood', 'Ayesha Begum', 'Sanya Singh')\nassert concatenate_strings((\"Harpreet\", \"Priyanka\", \"Muskan\"), (\"Kour\", \" Agarwal\", \"Sethi\")) == ('HarpreetKour', 'Priyanka Agarwal', 'MuskanSethi')","source_id":"213","source_row_sha256":"04a0a4d55370cb46a3ea95eeecb33ebb7e58b3da4f90b855b38b2e0c55e4095b"},{"category":"Python","id":"mbpp-214","prompt":"Write a function to convert radians to degrees.\n\nSource prompt examples:\nassert degree_radian(90)==5156.620156177409\nassert degree_radian(60)==3437.746770784939\nassert degree_radian(120)==6875.493541569878","source_id":"214","source_row_sha256":"53cc6f773fbdc37d0dc978d3644c129c9b9af84d0a3316859a1daa15edac1878"},{"category":"Python","id":"mbpp-215","prompt":"Write a function to decode a run-length encoded given list.\n\nSource prompt examples:\nassert decode_list([[2, 1], 2, 3, [2, 4], 5,1])==[1,1,2,3,4,4,5,1]\nassert decode_list(['a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', 'a', [2, 'l'], 'y'])==['a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', 'a', 'l', 'l', 'y']\nassert decode_list(['p', 'y', 't', 'h', 'o', 'n'])==['p', 'y', 't', 'h', 'o', 'n']","source_id":"215","source_row_sha256":"bf81d8dd71b2f5ffe8582c748e86d467fff9880e4e1c7b847d2fee2fa5976565"},{"category":"Python","id":"mbpp-216","prompt":"Write a function to check if a nested list is a subset of another nested list.\n\nSource prompt examples:\nassert check_subset_list([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],[[12, 18, 23, 25, 45], [7, 11, 19, 24, 28], [1, 5, 8, 18, 15, 16]])==False\nassert check_subset_list([[2, 3, 1], [4, 5], [6, 8]],[[4, 5], [6, 8]])==True\nassert check_subset_list([['a', 'b'], ['e'], ['c', 'd']],[['g']])==False","source_id":"216","source_row_sha256":"8eacc8b298b19e7ebc36f82d9a4d0d8cde238330d1e0af5e4dcf2ebe26803e6b"},{"category":"Python","id":"mbpp-217","prompt":"Write a python function to find the first repeated character in a given string.\n\nSource prompt examples:\nassert first_Repeated_Char(\"Google\") == \"o\"\nassert first_Repeated_Char(\"data\") == \"a\"\nassert first_Repeated_Char(\"python\") == '\\0'","source_id":"217","source_row_sha256":"b5e02292ea4f3f8c2441e09502e6c847e6220139e2c6fa1fe143be94894c24df"},{"category":"Python","id":"mbpp-218","prompt":"Write a python function to find the minimum operations required to make two numbers equal.\n\nSource prompt examples:\nassert min_Operations(2,4) == 1\nassert min_Operations(4,10) == 4\nassert min_Operations(1,4) == 3","source_id":"218","source_row_sha256":"2983f48b12b0a2d0cca070b8d2d2c851200cadfec2dbf08acb06f3b82e2732b0"},{"category":"Python","id":"mbpp-219","prompt":"Write a function to extract maximum and minimum k elements in the given tuple.\n\nSource prompt examples:\nassert extract_min_max((5, 20, 3, 7, 6, 8), 2) == (3, 5, 8, 20)\nassert extract_min_max((4, 5, 6, 1, 2, 7), 3) == (1, 2, 4, 5, 6, 7)\nassert extract_min_max((2, 3, 4, 8, 9, 11, 7), 4) == (2, 3, 4, 7, 8, 9, 11)","source_id":"219","source_row_sha256":"5147c0ebcfd6d3702f2a51ca99250288ebbd557b1e33973b40ecbbea5270989d"},{"category":"Python","id":"mbpp-22","prompt":"Write a function to find the first duplicate element in a given array of integers.\n\nSource prompt examples:\nassert find_first_duplicate(([1, 2, 3, 4, 4, 5]))==4\nassert find_first_duplicate([1, 2, 3, 4])==-1\nassert find_first_duplicate([1, 1, 2, 3, 3, 2, 2])==1","source_id":"22","source_row_sha256":"b8246cd531a40f8f8a2e5ebcadbdd206f17ce7443a4ac1be1ba3711739285ac5"},{"category":"Python","id":"mbpp-220","prompt":"Write a function to replace maximum n occurrences of spaces, commas, or dots with a colon.\n\nSource prompt examples:\nassert replace_max_specialchar('Python language, Programming language.',2)==('Python:language: Programming language.')\nassert replace_max_specialchar('a b c,d e f',3)==('a:b:c:d e f')\nassert replace_max_specialchar('ram reshma,ram rahim',1)==('ram:reshma,ram rahim')","source_id":"220","source_row_sha256":"d67326c95923793c6775b83cd6d71485221e4cf2823e517ace11409b59ed55b1"},{"category":"Python","id":"mbpp-221","prompt":"Write a python function to find the first even number in a given list of numbers.\n\nSource prompt examples:\nassert first_even ([1, 3, 5, 7, 4, 1, 6, 8]) == 4\nassert first_even([2, 3, 4]) == 2\nassert first_even([5, 6, 7]) == 6","source_id":"221","source_row_sha256":"2daaa481ff5beee2a6b334b040cce09bc37b394b7341c549f89526bcece1db1d"},{"category":"Python","id":"mbpp-222","prompt":"Write a function to check if all the elements in tuple have same data type or not.\n\nSource prompt examples:\nassert check_type((5, 6, 7, 3, 5, 6) ) == True\nassert check_type((1, 2, \"4\") ) == False\nassert check_type((3, 2, 1, 4, 5) ) == True","source_id":"222","source_row_sha256":"0e2219b32cf60072957a8037eaa3aa64aa1820a027a0e0dbfa410076fa9598ea"},{"category":"Python","id":"mbpp-223","prompt":"Write a function to check for majority element in the given sorted array.\n\nSource prompt examples:\nassert is_majority([1, 2, 3, 3, 3, 3, 10], 7, 3) == True\nassert is_majority([1, 1, 2, 4, 4, 4, 6, 6], 8, 4) == False\nassert is_majority([1, 1, 1, 2, 2], 5, 1) == True","source_id":"223","source_row_sha256":"667e7d9da09540dde6a52f3a410dcac9b9a8f9979e4e9bcd9f2db08c6f1f6e08"},{"category":"Python","id":"mbpp-224","prompt":"Write a python function to count set bits of a given number.\n\nSource prompt examples:\nassert count_Set_Bits(2) == 1\nassert count_Set_Bits(4) == 1\nassert count_Set_Bits(6) == 2","source_id":"224","source_row_sha256":"6679fe84f39d3d2264d33c28085232f4e19e9fad8d8f6b89009a45c77cb101d5"},{"category":"Python","id":"mbpp-225","prompt":"Write a python function to find the minimum element in a sorted and rotated array.\n\nSource prompt examples:\nassert find_Min([1,2,3,4,5],0,4) == 1\nassert find_Min([4,6,8],0,2) == 4\nassert find_Min([2,3,5,7,9],0,4) == 2","source_id":"225","source_row_sha256":"0b5fa2d4f25ccb5edd3f007df28fe5198e9e77457c6b823844fd5c6aebaaaa05"},{"category":"Python","id":"mbpp-226","prompt":"Write a python function to remove the characters which have odd index values of a given string.\n\nSource prompt examples:\nassert odd_values_string('abcdef') == 'ace'\nassert odd_values_string('python') == 'pto'\nassert odd_values_string('data') == 'dt'","source_id":"226","source_row_sha256":"2c740466fb477876eb5a380a57852921f282986e35b5cc59aab8361ef7379e00"},{"category":"Python","id":"mbpp-227","prompt":"Write a function to find minimum of three numbers.\n\nSource prompt examples:\nassert min_of_three(10,20,0)==0\nassert min_of_three(19,15,18)==15\nassert min_of_three(-10,-20,-30)==-30","source_id":"227","source_row_sha256":"b8e942d6e5883445a22173a93d0168603b1550d187fe03f38270c27cd9ba3e6d"},{"category":"Python","id":"mbpp-228","prompt":"Write a python function to check whether all the bits are unset in the given range or not.\n\nSource prompt examples:\nassert all_Bits_Set_In_The_Given_Range(4,1,2) == True\nassert all_Bits_Set_In_The_Given_Range(17,2,4) == True\nassert all_Bits_Set_In_The_Given_Range(39,4,6) == False","source_id":"228","source_row_sha256":"50de25c7cfbdce1fa3edf3a2cf30b52580ee716d7cd7a7645776461b7bccbde7"},{"category":"Python","id":"mbpp-229","prompt":"Write a function to re-arrange the elements of the given array so that all negative elements appear before positive ones.\n\nSource prompt examples:\nassert re_arrange_array([-1, 2, -3, 4, 5, 6, -7, 8, 9], 9) == [-1, -3, -7, 4, 5, 6, 2, 8, 9]\nassert re_arrange_array([12, -14, -26, 13, 15], 5) == [-14, -26, 12, 13, 15]\nassert re_arrange_array([10, 24, 36, -42, -39, -78, 85], 7) == [-42, -39, -78, 10, 24, 36, 85]","source_id":"229","source_row_sha256":"e96f5f53f476875f8fc5eef825d633dee2875066f09bc437d751c48c29116076"},{"category":"Python","id":"mbpp-23","prompt":"Write a python function to find the maximum sum of elements of list in a list of lists.\n\nSource prompt examples:\nassert maximum_Sum([[1,2,3],[4,5,6],[10,11,12],[7,8,9]]) == 33\nassert maximum_Sum([[0,1,1],[1,1,2],[3,2,1]]) == 6\nassert maximum_Sum([[0,1,3],[1,2,1],[9,8,2],[0,1,0],[6,4,8]]) == 19","source_id":"23","source_row_sha256":"94fa15b85f4de05625112be4590d3cef6a2703ec121ced9c253a12cdd635c037"},{"category":"Python","id":"mbpp-230","prompt":"Write a function to replace blank spaces with any character in a string.\n\nSource prompt examples:\nassert replace_blank(\"hello people\",'@')==(\"hello@people\")\nassert replace_blank(\"python program language\",'$')==(\"python$program$language\")\nassert replace_blank(\"blank space\",\"-\")==(\"blank-space\")","source_id":"230","source_row_sha256":"29ba71ea4e4b234ad320a821a63dc3860d58ac7a7efa4db0c45e75885abe7a01"},{"category":"Python","id":"mbpp-231","prompt":"Write a function to find the maximum sum in the given right triangle of numbers.\n\nSource prompt examples:\nassert max_sum([[1], [2,1], [3,3,2]], 3) == 6\nassert max_sum([[1], [1, 2], [4, 1, 12]], 3) == 15 \nassert max_sum([[2], [3,2], [13,23,12]], 3) == 28","source_id":"231","source_row_sha256":"916186a54da487838ed8d981eeebfe3868deacf4633f56f2d63eab25ef306c4a"},{"category":"Python","id":"mbpp-232","prompt":"Write a function to get the n largest items from a dataset.\n\nSource prompt examples:\nassert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],2)==[100,90]\nassert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],5)==[100,90,80,70,60]\nassert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],3)==[100,90,80]","source_id":"232","source_row_sha256":"a5e45ef2c7a5ab9e5cf2bfeb24719a2f7c79a2ffda522a2e8f1189a56747dccf"},{"category":"Python","id":"mbpp-233","prompt":"Write a function to find the lateral surface area of a cylinder.\n\nSource prompt examples:\nassert lateralsuface_cylinder(10,5)==314.15000000000003\nassert lateralsuface_cylinder(4,5)==125.66000000000001\nassert lateralsuface_cylinder(4,10)==251.32000000000002","source_id":"233","source_row_sha256":"22ef3a9b40d923abf0dc5c1267f1b31579230f6d90498d49386f9b2f9bfb93a7"},{"category":"Python","id":"mbpp-234","prompt":"Write a function to find the volume of a cube.\n\nSource prompt examples:\nassert volume_cube(3)==27\nassert volume_cube(2)==8\nassert volume_cube(5)==125","source_id":"234","source_row_sha256":"665f9caf005085f4df84783939064f297fb183751a8f6b20c659e6c584f62b73"},{"category":"Python","id":"mbpp-235","prompt":"Write a python function to set all even bits of a given number.\n\nSource prompt examples:\nassert even_bit_set_number(10) == 10\nassert even_bit_set_number(20) == 30\nassert even_bit_set_number(30) == 30","source_id":"235","source_row_sha256":"d94aa14ce6f4fa451391e00af08e142e0b335ce109b6166bacef12f2451b8d62"},{"category":"Python","id":"mbpp-236","prompt":"Write a python function to count the maximum number of equilateral triangles that can be formed within a given equilateral triangle.\n\nSource prompt examples:\nassert No_of_Triangle(4,2) == 7\nassert No_of_Triangle(4,3) == 3\nassert No_of_Triangle(1,3) == -1","source_id":"236","source_row_sha256":"5cc05ab98a80a4017602506f589b31d0a37eca0bf8fdde95cde714270bff1789"},{"category":"Python","id":"mbpp-237","prompt":"Write a function to check the occurrences of records which occur similar times in the given tuples.\n\nSource prompt examples:\nassert check_occurences([(3, 1), (1, 3), (2, 5), (5, 2), (6, 3)] ) == {(1, 3): 2, (2, 5): 2, (3, 6): 1}\nassert check_occurences([(4, 2), (2, 4), (3, 6), (6, 3), (7, 4)] ) == {(2, 4): 2, (3, 6): 2, (4, 7): 1}\nassert check_occurences([(13, 2), (11, 23), (12, 25), (25, 12), (16, 23)] ) == {(2, 13): 1, (11, 23): 1, (12, 25): 2, (16, 23): 1}","source_id":"237","source_row_sha256":"63803830040bf4fe191717c6ae13684c6ce09b29496ea8b4bccd8764f70e6b2c"},{"category":"Python","id":"mbpp-238","prompt":"Write a python function to count number of non-empty substrings of a given string.\n\nSource prompt examples:\nassert number_of_substrings(\"abc\") == 6\nassert number_of_substrings(\"abcd\") == 10\nassert number_of_substrings(\"abcde\") == 15","source_id":"238","source_row_sha256":"262ca592cbda740bbc82cbcc3b7055688f46eb586f5648a0d328c2ecebafe586"},{"category":"Python","id":"mbpp-239","prompt":"Write a function to find the number of possible sequences of length n such that each of the next element is greater than or equal to twice of the previous element but less than or equal to m.\n\nSource prompt examples:\nassert get_total_number_of_sequences(10, 4) == 4\nassert get_total_number_of_sequences(5, 2) == 6\nassert get_total_number_of_sequences(16, 3) == 84","source_id":"239","source_row_sha256":"5163e64f340c724b4012917bb3d1c212b85fbd399c07d6458c3c109051f2eb0f"},{"category":"Python","id":"mbpp-24","prompt":"Write a function to convert the given binary number to its decimal equivalent.\n\nSource prompt examples:\nassert binary_to_decimal(100) == 4\nassert binary_to_decimal(1011) == 11\nassert binary_to_decimal(1101101) == 109","source_id":"24","source_row_sha256":"6256cdf46fa80bff70fbab797887eb37bd44093d9314a9317ddac31dd242c63a"},{"category":"Python","id":"mbpp-240","prompt":"Write a function to replace the last element of the list with another list.\n\nSource prompt examples:\nassert replace_list([1, 3, 5, 7, 9, 10],[2, 4, 6, 8])==[1, 3, 5, 7, 9, 2, 4, 6, 8]\nassert replace_list([1,2,3,4,5],[5,6,7,8])==[1,2,3,4,5,6,7,8]\nassert replace_list([\"red\",\"blue\",\"green\"],[\"yellow\"])==[\"red\",\"blue\",\"yellow\"]","source_id":"240","source_row_sha256":"22ad6b24c9ea4758acdc21b16fa5d0166969407576cdf06a069e20eefec74f0f"},{"category":"Python","id":"mbpp-241","prompt":"Write a function to generate a 3d array having each element as '*'.\n\nSource prompt examples:\nassert array_3d(6,4,3)==[[['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']]]\nassert array_3d(5,3,4)==[[['*', '*', '*', '*', '*'], ['*', '*', '*', '*','*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'],['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']]]\nassert array_3d(1,2,3)==[[['*'],['*']],[['*'],['*']],[['*'],['*']]]","source_id":"241","source_row_sha256":"a6b4e2eeec6266d7aaac6b6e74813921f6933695d21c38e0efe77929479a82c0"},{"category":"Python","id":"mbpp-242","prompt":"Write a function to count total characters in a string.\n\nSource prompt examples:\nassert count_charac(\"python programming\")==18\nassert count_charac(\"language\")==8\nassert count_charac(\"words\")==5","source_id":"242","source_row_sha256":"3ea36202f92c1f8525cc87654354efddcecb82488d24578162f8b2e7e2ca32e6"},{"category":"Python","id":"mbpp-243","prompt":"Write a function to sort the given list based on the occurrence of first element of tuples.\n\nSource prompt examples:\nassert sort_on_occurence([(1, 'Jake'), (2, 'Bob'), (1, 'Cara')]) == [(1, 'Jake', 'Cara', 2), (2, 'Bob', 1)]\nassert sort_on_occurence([('b', 'ball'), ('a', 'arm'), ('b', 'b'), ('a', 'ant')]) == [('b', 'ball', 'b', 2), ('a', 'arm', 'ant', 2)]\nassert sort_on_occurence([(2, 'Mark'), (3, 'Maze'), (2, 'Sara')]) == [(2, 'Mark', 'Sara', 2), (3, 'Maze', 1)]","source_id":"243","source_row_sha256":"4f851927943e1867ad32bc02028416e15735ffaf7e85da32415eeef28a2ddfac"},{"category":"Python","id":"mbpp-244","prompt":"Write a python function to find the next perfect square greater than a given number.\n\nSource prompt examples:\nassert next_Perfect_Square(35) == 36\nassert next_Perfect_Square(6) == 9\nassert next_Perfect_Square(9) == 16","source_id":"244","source_row_sha256":"59ed2aac14737a08d26067e6152acc5c54d26af6dba408421b7bb5fe30b155be"},{"category":"Python","id":"mbpp-245","prompt":"Write a function to find the maximum sum of bi-tonic sub-sequence for the given array.\n\nSource prompt examples:\nassert max_sum([1, 15, 51, 45, 33, 100, 12, 18, 9], 9) == 194\nassert max_sum([80, 60, 30, 40, 20, 10], 6) == 210\nassert max_sum([2, 3 ,14, 16, 21, 23, 29, 30], 8) == 138","source_id":"245","source_row_sha256":"7acd0a39e54e72043f9420ee7b460c6a4abae07717015c455d9c47c423236f54"},{"category":"Python","id":"mbpp-246","prompt":"Write a function for computing square roots using the babylonian method.\n\nSource prompt examples:\nassert babylonian_squareroot(10)==3.162277660168379\nassert babylonian_squareroot(2)==1.414213562373095\nassert babylonian_squareroot(9)==3.0","source_id":"246","source_row_sha256":"8998deae62f5f356b6ac9cf37148d6d6b67ab172a05909f5e5f203a9ba35908e"},{"category":"Python","id":"mbpp-247","prompt":"Write a function to find the longest palindromic subsequence in the given string.\n\nSource prompt examples:\nassert lps(\"TENS FOR TENS\") == 5 \nassert lps(\"CARDIO FOR CARDS\") == 7\nassert lps(\"PART OF THE JOURNEY IS PART\") == 9 ","source_id":"247","source_row_sha256":"a87796eac4038f86403b73ff5a0eca46588a5ea1ddfc21629b4b4eeac4b4c549"},{"category":"Python","id":"mbpp-248","prompt":"Write a function to calculate the harmonic sum of n-1.\n\nSource prompt examples:\nassert harmonic_sum(7) == 2.5928571428571425\nassert harmonic_sum(4) == 2.083333333333333\nassert harmonic_sum(19) == 3.547739657143682","source_id":"248","source_row_sha256":"05a704f1217104892fc7aa1b871cb234612aba35e02e132da74fdb6f49810641"},{"category":"Python","id":"mbpp-249","prompt":"Write a function to find the intersection of two arrays using lambda function.\n\nSource prompt examples:\nassert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[1, 2, 4, 8, 9])==[1, 2, 8, 9]\nassert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[3,5,7,9])==[3,5,7,9]\nassert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[10,20,30,40])==[10]","source_id":"249","source_row_sha256":"83d46723c932196043d1762d7898fde75eee2dbe1d3a51a0b2b6817d1a9e1281"},{"category":"Python","id":"mbpp-25","prompt":"Write a python function to find the product of non-repeated elements in a given array.\n\nSource prompt examples:\nassert find_Product([1,1,2,3],4) == 6\nassert find_Product([1,2,3,1,1],5) == 6\nassert find_Product([1,1,4,5,6],5) == 120","source_id":"25","source_row_sha256":"efe22226fc12237d88887ec83afd8b0910bd58dddafcfc46b72a76d56021e3d5"},{"category":"Python","id":"mbpp-250","prompt":"Write a python function to count the occcurences of an element in a tuple.\n\nSource prompt examples:\nassert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),4) == 0\nassert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),10) == 3\nassert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),8) == 4","source_id":"250","source_row_sha256":"9696273d36e9ceaf6584cd99a3cfe09d6883ac2e44ac0491cf811e3c4b8e6854"},{"category":"Python","id":"mbpp-251","prompt":"Write a function to insert an element before each element of a list.\n\nSource prompt examples:\nassert insert_element(['Red', 'Green', 'Black'] ,'c')==['c', 'Red', 'c', 'Green', 'c', 'Black'] \nassert insert_element(['python', 'java'] ,'program')==['program', 'python', 'program', 'java'] \nassert insert_element(['happy', 'sad'] ,'laugh')==['laugh', 'happy', 'laugh', 'sad'] ","source_id":"251","source_row_sha256":"e2d5ea3cb45a6f4d1b88bdc9a09c794662adbcc09adbb09d2a116b6e9956bc34"},{"category":"Python","id":"mbpp-252","prompt":"Write a python function to convert complex numbers to polar coordinates.\n\nSource prompt examples:\nassert convert(1) == (1.0, 0.0)\nassert convert(4) == (4.0,0.0)\nassert convert(5) == (5.0,0.0)","source_id":"252","source_row_sha256":"7cbc3165166d3786f05e03f6ef32baec3bc725714c96073e0f6be81de400c132"},{"category":"Python","id":"mbpp-253","prompt":"Write a python function to count integers from a given list.\n\nSource prompt examples:\nassert count_integer([1,2,'abc',1.2]) == 2\nassert count_integer([1,2,3]) == 3\nassert count_integer([1,1.2,4,5.1]) == 2","source_id":"253","source_row_sha256":"945d3ceacbd31e30b5e549e2b25b4b085695f9c4c35d882bf41819763df645bf"},{"category":"Python","id":"mbpp-254","prompt":"Write a function to find all words starting with 'a' or 'e' in a given string.\n\nSource prompt examples:\nassert words_ae(\"python programe\")==['ame']\nassert words_ae(\"python programe language\")==['ame','anguage']\nassert words_ae(\"assert statement\")==['assert', 'atement']","source_id":"254","source_row_sha256":"0e7f0b829b32b35ed2bacabb87976f54228d4fb910f889673a4fda968d35b5dc"},{"category":"Python","id":"mbpp-255","prompt":"Write a function to choose specified number of colours from three different colours and generate all the combinations with repetitions.\n\nSource prompt examples:\nassert combinations_colors( [\"Red\",\"Green\",\"Blue\"],1)==[('Red',), ('Green',), ('Blue',)]\nassert combinations_colors( [\"Red\",\"Green\",\"Blue\"],2)==[('Red', 'Red'), ('Red', 'Green'), ('Red', 'Blue'), ('Green', 'Green'), ('Green', 'Blue'), ('Blue', 'Blue')]\nassert combinations_colors( [\"Red\",\"Green\",\"Blue\"],3)==[('Red', 'Red', 'Red'), ('Red', 'Red', 'Green'), ('Red', 'Red', 'Blue'), ('Red', 'Green', 'Green'), ('Red', 'Green', 'Blue'), ('Red', 'Blue', 'Blue'), ('Green', 'Green', 'Green'), ('Green', 'Green', 'Blue'), ('Green', 'Blue', 'Blue'), ('Blue', 'Blue', 'Blue')]","source_id":"255","source_row_sha256":"82ea3f16c514d5a57642b5dc85e8e87601fbc37d0b40d341744ef76940143de4"},{"category":"Python","id":"mbpp-256","prompt":"Write a python function to count the number of prime numbers less than a given non-negative number.\n\nSource prompt examples:\nassert count_Primes_nums(5) == 2\nassert count_Primes_nums(10) == 4\nassert count_Primes_nums(100) == 25","source_id":"256","source_row_sha256":"2d1a1bf12bcd41b8fedfb0ae831bcaf37742b976e5484e9449f4b7a4de10e3e4"},{"category":"Python","id":"mbpp-257","prompt":"Write a function to swap two numbers.\n\nSource prompt examples:\nassert swap_numbers(10,20)==(20,10)\nassert swap_numbers(15,17)==(17,15)\nassert swap_numbers(100,200)==(200,100)","source_id":"257","source_row_sha256":"f89d4f8821bb869598da29548abc672020f74dcab413a3fd424c31f964a8f2d1"},{"category":"Python","id":"mbpp-258","prompt":"Write a function to find number of odd elements in the given list using lambda function.\n\nSource prompt examples:\nassert count_odd([1, 2, 3, 5, 7, 8, 10])==4\nassert count_odd([10,15,14,13,-18,12,-20])==2\nassert count_odd([1, 2, 4, 8, 9])==2","source_id":"258","source_row_sha256":"c84d1ccc1379dc8529e16ce3896b4a6070f6335f3365577faa924e8a11f110c4"},{"category":"Python","id":"mbpp-259","prompt":"Write a function to maximize the given two tuples.\n\nSource prompt examples:\nassert maximize_elements(((1, 3), (4, 5), (2, 9), (1, 10)), ((6, 7), (3, 9), (1, 1), (7, 3))) == ((6, 7), (4, 9), (2, 9), (7, 10))\nassert maximize_elements(((2, 4), (5, 6), (3, 10), (2, 11)), ((7, 8), (4, 10), (2, 2), (8, 4))) == ((7, 8), (5, 10), (3, 10), (8, 11))\nassert maximize_elements(((3, 5), (6, 7), (4, 11), (3, 12)), ((8, 9), (5, 11), (3, 3), (9, 5))) == ((8, 9), (6, 11), (4, 11), (9, 12))","source_id":"259","source_row_sha256":"c3f3c96482bfd6ef6623e027bde6e2080662c86c9e4f41826cbfcf3b1f8b2afb"},{"category":"Python","id":"mbpp-26","prompt":"Write a function to check if the given tuple list has all k elements.\n\nSource prompt examples:\nassert check_k_elements([(4, 4), (4, 4, 4), (4, 4), (4, 4, 4, 4), (4, )], 4) == True\nassert check_k_elements([(7, 7, 7), (7, 7)], 7) == True\nassert check_k_elements([(9, 9), (9, 9, 9, 9)], 7) == False","source_id":"26","source_row_sha256":"6fd6bc79dafe5aceed8ac7e971a03766828165a073c2cc828a97aff86386f646"},{"category":"Python","id":"mbpp-260","prompt":"Write a function to find the nth newman–shanks–williams prime number.\n\nSource prompt examples:\nassert newman_prime(3) == 7 \nassert newman_prime(4) == 17\nassert newman_prime(5) == 41","source_id":"260","source_row_sha256":"b6194ad9a60a80037438357a78d592d5b9f0e03e286e85ecd8adc5c9b54d0567"},{"category":"Python","id":"mbpp-261","prompt":"Write a function to perform mathematical division operation across the given tuples.\n\nSource prompt examples:\nassert division_elements((10, 4, 6, 9),(5, 2, 3, 3)) == (2, 2, 2, 3)\nassert division_elements((12, 6, 8, 16),(6, 3, 4, 4)) == (2, 2, 2, 4)\nassert division_elements((20, 14, 36, 18),(5, 7, 6, 9)) == (4, 2, 6, 2)","source_id":"261","source_row_sha256":"d077cbe8e958cce83be98797afbd59db2758903b2baab3c6388fcf07cff6350d"},{"category":"Python","id":"mbpp-262","prompt":"Write a function to split a given list into two parts where the length of the first part of the list is given.\n\nSource prompt examples:\nassert split_two_parts([1,1,2,3,4,4,5,1],3)==([1, 1, 2], [3, 4, 4, 5, 1])\nassert split_two_parts(['a', 'b', 'c', 'd'],2)==(['a', 'b'], ['c', 'd'])\nassert split_two_parts(['p', 'y', 't', 'h', 'o', 'n'],4)==(['p', 'y', 't', 'h'], ['o', 'n'])","source_id":"262","source_row_sha256":"cd42d5e9f843af1fdbe88748720f49cffb45659091b8b2d741729d029eb40cc2"},{"category":"Python","id":"mbpp-263","prompt":"Write a function to merge two dictionaries.\n\nSource prompt examples:\nassert merge_dict({'a': 100, 'b': 200},{'x': 300, 'y': 200})=={'x': 300, 'y': 200, 'a': 100, 'b': 200}\nassert merge_dict({'a':900,'b':900,'d':900},{'a':900,'b':900,'d':900})=={'a':900,'b':900,'d':900,'a':900,'b':900,'d':900}\nassert merge_dict({'a':10,'b':20},{'x':30,'y':40})=={'x':30,'y':40,'a':10,'b':20}","source_id":"263","source_row_sha256":"adfbb7f87340d403c028017c737fcfeb3d683c2115988507e2ef95d8ca34165e"},{"category":"Python","id":"mbpp-264","prompt":"Write a function to calculate a dog's age in dog's years.\n\nSource prompt examples:\nassert dog_age(12)==61\nassert dog_age(15)==73\nassert dog_age(24)==109","source_id":"264","source_row_sha256":"8e4f17b745469ad110fe1d7b0ca0d795e225c8c0f48004bfcf56403f24fb1371"},{"category":"Python","id":"mbpp-265","prompt":"Write a function to split a list for every nth element.\n\nSource prompt examples:\nassert list_split(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n'],3)==[['a', 'd', 'g', 'j', 'm'], ['b', 'e', 'h', 'k', 'n'], ['c', 'f', 'i', 'l']] \nassert list_split([1,2,3,4,5,6,7,8,9,10,11,12,13,14],3)==[[1,4,7,10,13], [2,5,8,11,14], [3,6,9,12]] \nassert list_split(['python','java','C','C++','DBMS','SQL'],2)==[['python', 'C', 'DBMS'], ['java', 'C++', 'SQL']] ","source_id":"265","source_row_sha256":"22917d944c591f1bcb65e76e03b5abc37baebe4a7a088d1a3f50f2912696aa06"},{"category":"Python","id":"mbpp-266","prompt":"Write a function to find the lateral surface area of a cube.\n\nSource prompt examples:\nassert lateralsurface_cube(5)==100\nassert lateralsurface_cube(9)==324\nassert lateralsurface_cube(10)==400","source_id":"266","source_row_sha256":"d7597dccf3238ec0181801a18a8d30e5031d125518fe8d3f2454b385273344ab"},{"category":"Python","id":"mbpp-267","prompt":"Write a python function to find the sum of squares of first n odd natural numbers.\n\nSource prompt examples:\nassert square_Sum(2) == 10\nassert square_Sum(3) == 35\nassert square_Sum(4) == 84","source_id":"267","source_row_sha256":"62acc3fc7c96a61ccda286cad41fc49bd9eb6f80320d91404380e9537605b965"},{"category":"Python","id":"mbpp-268","prompt":"Write a function to find the n'th star number.\n\nSource prompt examples:\nassert find_star_num(3) == 37\nassert find_star_num(4) == 73\nassert find_star_num(5) == 121","source_id":"268","source_row_sha256":"72c8a43e237a46f8f02f60a7ba7897e37a842d24ba47c4f607f4342d35c738b4"},{"category":"Python","id":"mbpp-269","prompt":"Write a function to find the ascii value of a character.\n\nSource prompt examples:\nassert ascii_value('A')==65\nassert ascii_value('R')==82\nassert ascii_value('S')==83","source_id":"269","source_row_sha256":"aa58305bad8b201b121b9079ba2c622629232b3adc66141bef478754bb7c0484"},{"category":"Python","id":"mbpp-27","prompt":"Write a python function to remove all digits from a list of strings.\n\nSource prompt examples:\nassert remove(['4words', '3letters', '4digits']) == ['words', 'letters', 'digits']\nassert remove(['28Jan','12Jan','11Jan']) == ['Jan','Jan','Jan']\nassert remove(['wonder1','wonder2','wonder3']) == ['wonder','wonder','wonder']","source_id":"27","source_row_sha256":"3a439881e523558bf3b3e2e771420df7d5dbba157645b10981f733087f727be4"},{"category":"Python","id":"mbpp-270","prompt":"Write a python function to find the sum of even numbers at even positions.\n\nSource prompt examples:\nassert sum_even_and_even_index([5, 6, 12, 1, 18, 8],6) == 30\nassert sum_even_and_even_index([3, 20, 17, 9, 2, 10, 18, 13, 6, 18],10) == 26\nassert sum_even_and_even_index([5, 6, 12, 1],4) == 12","source_id":"270","source_row_sha256":"7a81fa3cf387d9616c11fcb6841af14d96524f19a9a1ff46033e1588b9811d1f"},{"category":"Python","id":"mbpp-271","prompt":"Write a python function to find the sum of fifth power of first n even natural numbers.\n\nSource prompt examples:\nassert even_Power_Sum(2) == 1056\nassert even_Power_Sum(3) == 8832\nassert even_Power_Sum(1) == 32","source_id":"271","source_row_sha256":"08a69c16467c183f8c78ad5c9bded745330d2c931769f803f3e8454726b0fdd8"},{"category":"Python","id":"mbpp-272","prompt":"Write a function to perfom the rear element extraction from list of tuples records.\n\nSource prompt examples:\nassert rear_extract([(1, 'Rash', 21), (2, 'Varsha', 20), (3, 'Kil', 19)]) == [21, 20, 19]\nassert rear_extract([(1, 'Sai', 36), (2, 'Ayesha', 25), (3, 'Salman', 45)]) == [36, 25, 45]\nassert rear_extract([(1, 'Sudeep', 14), (2, 'Vandana', 36), (3, 'Dawood', 56)]) == [14, 36, 56]","source_id":"272","source_row_sha256":"576064668e57ec3d1816e62b5e136abac4dab78d302321c92167d8ba79bb38d1"},{"category":"Python","id":"mbpp-273","prompt":"Write a function to substract the contents of one tuple with corresponding index of other tuple.\n\nSource prompt examples:\nassert substract_elements((10, 4, 5), (2, 5, 18)) == (8, -1, -13)\nassert substract_elements((11, 2, 3), (24, 45 ,16)) == (-13, -43, -13)\nassert substract_elements((7, 18, 9), (10, 11, 12)) == (-3, 7, -3)","source_id":"273","source_row_sha256":"4df921054854d7d7c3645fc82d8d4eb7bafa89b56406a65168d3fa7e05e70d39"},{"category":"Python","id":"mbpp-274","prompt":"Write a python function to find sum of even index binomial coefficients.\n\nSource prompt examples:\nassert even_binomial_Coeff_Sum(4) == 8\nassert even_binomial_Coeff_Sum(6) == 32\nassert even_binomial_Coeff_Sum(2) == 2","source_id":"274","source_row_sha256":"486d5945f2d8eed9ac694e2bddb3149665665d86ef2ab29ccff109531675de38"},{"category":"Python","id":"mbpp-275","prompt":"Write a python function to find the position of the last removed element from the given array.\n\nSource prompt examples:\nassert get_Position([2,5,4],3,2) == 2\nassert get_Position([4,3],2,2) == 2\nassert get_Position([1,2,3,4],4,1) == 4","source_id":"275","source_row_sha256":"1287db95ddeafe1dbce0fe2793aa5a0176213d0608166d2ef9ae75d1fd256625"},{"category":"Python","id":"mbpp-276","prompt":"Write a function to find the volume of a cylinder.\n\nSource prompt examples:\nassert volume_cylinder(10,5)==1570.7500000000002\nassert volume_cylinder(4,5)==251.32000000000002\nassert volume_cylinder(4,10)==502.64000000000004","source_id":"276","source_row_sha256":"41e23e033c3b54cbb80f4026c7ceedf4123b7e70ece3ddc2c2784facf3138d3d"},{"category":"Python","id":"mbpp-277","prompt":"Write a function to filter a dictionary based on values.\n\nSource prompt examples:\nassert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},170)=={'Cierra Vega': 175, 'Alden Cantrell': 180, 'Pierre Cox': 190}\nassert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},180)=={ 'Alden Cantrell': 180, 'Pierre Cox': 190}\nassert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},190)=={ 'Pierre Cox': 190}","source_id":"277","source_row_sha256":"ceccab1b082b3bedb3ef4316595b0d59cac5b2b88f96ca13c279dbd334d6aa1c"},{"category":"Python","id":"mbpp-278","prompt":"Write a function to find the element count that occurs before the record in the given tuple.\n\nSource prompt examples:\nassert count_first_elements((1, 5, 7, (4, 6), 10) ) == 3\nassert count_first_elements((2, 9, (5, 7), 11) ) == 2\nassert count_first_elements((11, 15, 5, 8, (2, 3), 8) ) == 4","source_id":"278","source_row_sha256":"ade608213fbeb5db250931d91f103fd929cf880cf0f032117e0c83fe2c1448ea"},{"category":"Python","id":"mbpp-279","prompt":"Write a function to find the nth decagonal number.\n\nSource prompt examples:\nassert is_num_decagonal(3) == 27\nassert is_num_decagonal(7) == 175\nassert is_num_decagonal(10) == 370","source_id":"279","source_row_sha256":"ac998624d0aae52890db4fdeb2817d794d911e61c3126705e9680a91a180091b"},{"category":"Python","id":"mbpp-28","prompt":"Write a python function to find binomial co-efficient.\n\nSource prompt examples:\nassert binomial_Coeff(5,2) == 10\nassert binomial_Coeff(4,3) == 4\nassert binomial_Coeff(3,2) == 3","source_id":"28","source_row_sha256":"d9cd3d644119889ea9a9a159e7f137b2559506cbeaa58aef6a0f02c07549ff38"},{"category":"Python","id":"mbpp-280","prompt":"Write a function to search an element in the given array by using sequential search.\n\nSource prompt examples:\nassert sequential_search([11,23,58,31,56,77,43,12,65,19],31) == (True, 3)\nassert sequential_search([12, 32, 45, 62, 35, 47, 44, 61],61) == (True, 7)\nassert sequential_search([9, 10, 17, 19, 22, 39, 48, 56],48) == (True, 6)","source_id":"280","source_row_sha256":"f631cf5e37017507572f748ac997b8c471029c6ce3f283c9233f74ac863bb57d"},{"category":"Python","id":"mbpp-281","prompt":"Write a python function to check if the elements of a given list are unique or not.\n\nSource prompt examples:\nassert all_unique([1,2,3]) == True\nassert all_unique([1,2,1,2]) == False\nassert all_unique([1,2,3,4,5]) == True","source_id":"281","source_row_sha256":"6ab68b1de9732f4ddcd295c498c2d1365fec53cf889bb96433f2f6b5d51c7b18"},{"category":"Python","id":"mbpp-282","prompt":"Write a function to substaract two lists using map and lambda function.\n\nSource prompt examples:\nassert sub_list([1, 2, 3],[4,5,6])==[-3,-3,-3]\nassert sub_list([1,2],[3,4])==[-2,-2]\nassert sub_list([90,120],[50,70])==[40,50]","source_id":"282","source_row_sha256":"5a0ca4358edfd3c6151ff2632a9288d8c60a2c1b7e3c7ddc0304548e1d345783"},{"category":"Python","id":"mbpp-283","prompt":"Write a python function to check whether the frequency of each digit is less than or equal to the digit itself.\n\nSource prompt examples:\nassert validate(1234) == True\nassert validate(51241) == False\nassert validate(321) == True","source_id":"283","source_row_sha256":"7cffdc54e0e194dda84dd1dd1e9bbe1b592a8356cbb206b6c5a17566e9a43c33"},{"category":"Python","id":"mbpp-284","prompt":"Write a function to check whether all items of a list are equal to a given string.\n\nSource prompt examples:\nassert check_element([\"green\", \"orange\", \"black\", \"white\"],'blue')==False\nassert check_element([1,2,3,4],7)==False\nassert check_element([\"green\", \"green\", \"green\", \"green\"],'green')==True","source_id":"284","source_row_sha256":"6989a5e8bbd37e8a702e0f878415050a558106482a7a0a2eca3399d827dd1ad1"},{"category":"Python","id":"mbpp-285","prompt":"Write a function that matches a string that has an a followed by two to three 'b'.\n\nSource prompt examples:\nassert text_match_two_three(\"ac\")==('Not matched!')\nassert text_match_two_three(\"dc\")==('Not matched!')\nassert text_match_two_three(\"abbbba\")==('Found a match!')","source_id":"285","source_row_sha256":"de1dacc4f74636a1ed72f7f099e003b8affd2aa7a217a7838862f95443ed2066"},{"category":"Python","id":"mbpp-286","prompt":"Write a function to find the largest sum of contiguous array in the modified array which is formed by repeating the given array k times.\n\nSource prompt examples:\nassert max_sub_array_sum_repeated([10, 20, -30, -1], 4, 3) == 30\nassert max_sub_array_sum_repeated([-1, 10, 20], 3, 2) == 59\nassert max_sub_array_sum_repeated([-1, -2, -3], 3, 3) == -1","source_id":"286","source_row_sha256":"f8d4d87b6482c3e04aec7617baafbe4a34341d8a08598da851d4785add1da37d"},{"category":"Python","id":"mbpp-287","prompt":"Write a python function to find the sum of squares of first n even natural numbers.\n\nSource prompt examples:\nassert square_Sum(2) == 20\nassert square_Sum(3) == 56\nassert square_Sum(4) == 120","source_id":"287","source_row_sha256":"32ccde7c8c99252ca0fa0cf999e161abde2a93e2c2153ef11ce035b6d215e9cd"},{"category":"Python","id":"mbpp-288","prompt":"Write a function to count array elements having modular inverse under given prime number p equal to itself.\n\nSource prompt examples:\nassert modular_inverse([ 1, 6, 4, 5 ], 4, 7) == 2\nassert modular_inverse([1, 3, 8, 12, 12], 5, 13) == 3\nassert modular_inverse([2, 3, 4, 5], 4, 6) == 1","source_id":"288","source_row_sha256":"ccd1fcff00edea702ee14c9da251a11e3ddfd811d7329a066c5883e2dde08d0a"},{"category":"Python","id":"mbpp-289","prompt":"Write a python function to calculate the number of odd days in a given year.\n\nSource prompt examples:\nassert odd_Days(100) == 5\nassert odd_Days(50) ==6\nassert odd_Days(75) == 2","source_id":"289","source_row_sha256":"2bc3c75168527dfae40ccc03b895dfb11dadb15efd85478ba9e64809b5a7b6db"},{"category":"Python","id":"mbpp-29","prompt":"Write a python function to find the element occurring odd number of times.\n\nSource prompt examples:\nassert get_Odd_Occurrence([1,2,3,1,2,3,1],7) == 1\nassert get_Odd_Occurrence([1,2,3,2,3,1,3],7) == 3\nassert get_Odd_Occurrence([2,3,5,4,5,2,4,3,5,2,4,4,2],13) == 5","source_id":"29","source_row_sha256":"5b4f763bfe2666a2cbce6fcc21d07052dd2d01954e02c966ed2f8b238d529e0c"},{"category":"Python","id":"mbpp-290","prompt":"Write a function to find the list of lists with maximum length.\n\nSource prompt examples:\nassert max_length([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(3, [13, 15, 17])\nassert max_length([[1], [5, 7], [10, 12, 14,15]])==(4, [10, 12, 14,15])\nassert max_length([[5], [15,20,25]])==(3, [15,20,25])","source_id":"290","source_row_sha256":"9a3ae8c6319ba61b82a8fbe39897e0350e6927ff4b53cac49eb0fc97df6f5866"},{"category":"Python","id":"mbpp-291","prompt":"Write a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\n\nSource prompt examples:\nassert count_no_of_ways(2, 4) == 16\nassert count_no_of_ways(3, 2) == 6\nassert count_no_of_ways(4, 4) == 228","source_id":"291","source_row_sha256":"d0d1c2aa502d6d46fecb6c5e0ce69faf7f8ab61a0821e8e49049bdddfa85631b"},{"category":"Python","id":"mbpp-292","prompt":"Write a python function to find quotient of two numbers.\n\nSource prompt examples:\nassert find(10,3) == 3\nassert find(4,2) == 2\nassert find(20,5) == 4","source_id":"292","source_row_sha256":"698372a60db2e12c33e47f3e272d49aa5aa50116cdfb8901f2ce6556a90ad5a6"},{"category":"Python","id":"mbpp-293","prompt":"Write a function to find the third side of a right angled triangle.\n\nSource prompt examples:\nassert otherside_rightangle(7,8)==10.63014581273465\nassert otherside_rightangle(3,4)==5\nassert otherside_rightangle(7,15)==16.55294535724685","source_id":"293","source_row_sha256":"e400bee569ae62b01f22944c9224bb23eed25f9e26f7569e0b3bf326a8654323"},{"category":"Python","id":"mbpp-294","prompt":"Write a function to find the maximum value in a given heterogeneous list.\n\nSource prompt examples:\nassert max_val(['Python', 3, 2, 4, 5, 'version'])==5\nassert max_val(['Python', 15, 20, 25])==25\nassert max_val(['Python', 30, 20, 40, 50, 'version'])==50","source_id":"294","source_row_sha256":"b8a61d7aeac429d75e8116c00d198a9c1ff73fc1f02a613b10f51bd8ffedb0af"},{"category":"Python","id":"mbpp-295","prompt":"Write a function to return the sum of all divisors of a number.\n\nSource prompt examples:\nassert sum_div(8)==7\nassert sum_div(12)==16\nassert sum_div(7)==1","source_id":"295","source_row_sha256":"7b7abb5bdec52ea8a24189bbcfaa2b38ae08b88bf358f311460d8d352b824dad"},{"category":"Python","id":"mbpp-296","prompt":"Write a python function to count inversions in an array.\n\nSource prompt examples:\nassert get_Inv_Count([1,20,6,4,5],5) == 5\nassert get_Inv_Count([1,2,1],3) == 1\nassert get_Inv_Count([1,2,5,6,1],5) == 3","source_id":"296","source_row_sha256":"d97a11338673a35b36f319686852011c756031f4b9d402aa0b282f39d5bec944"},{"category":"Python","id":"mbpp-297","prompt":"Write a function to flatten a given nested list structure.\n\nSource prompt examples:\nassert flatten_list([0, 10, [20, 30], 40, 50, [60, 70, 80], [90, 100, 110, 120]])==[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]\nassert flatten_list([[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]])==[10, 20, 40, 30, 56, 25, 10, 20, 33, 40]\nassert flatten_list([[1,2,3], [4,5,6], [10,11,12], [7,8,9]])==[1, 2, 3, 4, 5, 6, 10, 11, 12, 7, 8, 9]","source_id":"297","source_row_sha256":"e4a4b208a80e3a2ddfb7cb95c93f6bfc65512b352439f8289b1e8df0fa9d50ef"},{"category":"Python","id":"mbpp-298","prompt":"Write a function to find the nested list elements which are present in another list.\n\nSource prompt examples:\nassert intersection_nested_lists( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],[[12, 18, 23, 25, 45], [7, 11, 19, 24, 28], [1, 5, 8, 18, 15, 16]])==[[12], [7, 11], [1, 5, 8]]\nassert intersection_nested_lists([[2, 3, 1], [4, 5], [6, 8]], [[4, 5], [6, 8]])==[[], []]\nassert intersection_nested_lists(['john','amal','joel','george'],[['john'],['jack','john','mary'],['howard','john'],['jude']])==[['john'], ['john'], ['john'], []]","source_id":"298","source_row_sha256":"e0b985be8b1ba2652b5e38c36d2a14a03757174511a1848ad1eb77c56f4d1674"},{"category":"Python","id":"mbpp-299","prompt":"Write a function to calculate the maximum aggregate from the list of tuples.\n\nSource prompt examples:\nassert max_aggregate([('Juan Whelan',90),('Sabah Colley',88),('Peter Nichols',7),('Juan Whelan',122),('Sabah Colley',84)])==('Juan Whelan', 212)\nassert max_aggregate([('Juan Whelan',50),('Sabah Colley',48),('Peter Nichols',37),('Juan Whelan',22),('Sabah Colley',14)])==('Juan Whelan', 72)\nassert max_aggregate([('Juan Whelan',10),('Sabah Colley',20),('Peter Nichols',30),('Juan Whelan',40),('Sabah Colley',50)])==('Sabah Colley', 70)","source_id":"299","source_row_sha256":"30bf191327e975e489614dd62afdd51e9f9765874bc575130647057c8113da9c"},{"category":"Python","id":"mbpp-30","prompt":"Write a python function to count all the substrings starting and ending with same characters.\n\nSource prompt examples:\nassert count_Substring_With_Equal_Ends(\"abc\") == 3\nassert count_Substring_With_Equal_Ends(\"abcda\") == 6\nassert count_Substring_With_Equal_Ends(\"ab\") == 2","source_id":"30","source_row_sha256":"28ee7ffef075f133cb180fb9af1bc99a07b82295f2e3a1e9700ff7e6a6f8f4db"},{"category":"Python","id":"mbpp-300","prompt":"Write a function to find the count of all binary sequences of length 2n such that sum of first n bits is same as sum of last n bits.\n\nSource prompt examples:\nassert count_binary_seq(1) == 2.0\nassert count_binary_seq(2) == 6.0\nassert count_binary_seq(3) == 20.0","source_id":"300","source_row_sha256":"965f33e0eccfd60b0f167af13ed404e980cffaf8db9e69b83134e626b93ef054"},{"category":"Python","id":"mbpp-301","prompt":"Write a function to find the depth of a dictionary.\n\nSource prompt examples:\nassert dict_depth({'a':1, 'b': {'c': {'d': {}}}})==4\nassert dict_depth({'a':1, 'b': {'c':'python'}})==2\nassert dict_depth({1: 'Sun', 2: {3: {4:'Mon'}}})==3","source_id":"301","source_row_sha256":"74667282774f903859f157e01b9f50b1c7d6f8857c5bb8f4f506f8f56c66a777"},{"category":"Python","id":"mbpp-302","prompt":"Write a python function to find the most significant bit number which is also a set bit.\n\nSource prompt examples:\nassert set_Bit_Number(6) == 4\nassert set_Bit_Number(10) == 8\nassert set_Bit_Number(18) == 16","source_id":"302","source_row_sha256":"3160ae00126548ac0de45dd5257c8131a26d08a934dbd6d4aa2f67b206340935"},{"category":"Python","id":"mbpp-303","prompt":"Write a python function to check whether the count of inversion of two types are same or not.\n\nSource prompt examples:\nassert solve([1,0,2],3) == True\nassert solve([1,2,0],3) == False\nassert solve([1,2,1],3) == True","source_id":"303","source_row_sha256":"f50101711257c98c0775136dde815a7558e5f6014fbe0fdd0c895bdfb1f97b3e"},{"category":"Python","id":"mbpp-304","prompt":"Write a python function to find element at a given index after number of rotations.\n\nSource prompt examples:\nassert find_Element([1,2,3,4,5],[[0,2],[0,3]],2,1) == 3\nassert find_Element([1,2,3,4],[[0,1],[0,2]],1,2) == 3\nassert find_Element([1,2,3,4,5,6],[[0,1],[0,2]],1,1) == 1","source_id":"304","source_row_sha256":"f2a7aeca42bf6d5cdf1a8706777af8673b23ea53cd03b696858bb4d148c1beb4"},{"category":"Python","id":"mbpp-305","prompt":"Write a function to match two words from a list of words starting with letter 'p'.\n\nSource prompt examples:\nassert start_withp([\"Python PHP\", \"Java JavaScript\", \"c c++\"])==('Python', 'PHP')\nassert start_withp([\"Python Programming\",\"Java Programming\"])==('Python','Programming')\nassert start_withp([\"Pqrst Pqr\",\"qrstuv\"])==('Pqrst','Pqr')","source_id":"305","source_row_sha256":"fd4c4415ed2bbd570117a49d5110585810e3cc1bda7008d77647ebc6c79afdc3"},{"category":"Python","id":"mbpp-306","prompt":"Write a function to find the maximum sum of increasing subsequence from prefix till ith index and also including a given kth element which is after i, i.e., k > i .\n\nSource prompt examples:\nassert max_sum_increasing_subseq([1, 101, 2, 3, 100, 4, 5 ], 7, 4, 6) == 11\nassert max_sum_increasing_subseq([1, 101, 2, 3, 100, 4, 5 ], 7, 2, 5) == 7\nassert max_sum_increasing_subseq([11, 15, 19, 21, 26, 28, 31], 7, 2, 4) == 71","source_id":"306","source_row_sha256":"077342aa96cb6fc5bad7614230490fc4f15a0d2f2307591cfecd80c050da15fd"},{"category":"Python","id":"mbpp-307","prompt":"Write a function to get a colon of a tuple.\n\nSource prompt examples:\nassert colon_tuplex((\"HELLO\", 5, [], True) ,2,50)==(\"HELLO\", 5, [50], True) \nassert colon_tuplex((\"HELLO\", 5, [], True) ,2,100)==((\"HELLO\", 5, [100],True))\nassert colon_tuplex((\"HELLO\", 5, [], True) ,2,500)==(\"HELLO\", 5, [500], True)","source_id":"307","source_row_sha256":"fb3089b2b0dfd410dd16f501f85d3f14898182ce374a9494ef943044db5fb365"},{"category":"Python","id":"mbpp-308","prompt":"Write a function to find the specified number of largest products from two given lists.\n\nSource prompt examples:\nassert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],3)==[60, 54, 50]\nassert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],4)==[60, 54, 50, 48]\nassert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],5)==[60, 54, 50, 48, 45]","source_id":"308","source_row_sha256":"a2cecac34bb98dd7fbe6557194641182f68e3c2e40dc3926dc62e6d2fc847f87"},{"category":"Python","id":"mbpp-309","prompt":"Write a python function to find the maximum of two numbers.\n\nSource prompt examples:\nassert maximum(5,10) == 10\nassert maximum(-1,-2) == -1\nassert maximum(9,7) == 9","source_id":"309","source_row_sha256":"3f4a118c55b2c193cc8391b851bb2c8f6bd61ea81849c3e86fc7fa2b412c2506"},{"category":"Python","id":"mbpp-31","prompt":"Write a function to find the top k integers that occur most frequently from given lists of sorted and distinct integers using heap queue algorithm.\n\nSource prompt examples:\nassert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]],3)==[5, 7, 1]\nassert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]],1)==[1]\nassert func([[1, 2, 6], [1, 3, 4, 5, 7, 8], [1, 3, 5, 6, 8, 9], [2, 5, 7, 11], [1, 4, 7, 8, 12]],5)==[6, 5, 7, 8, 1]","source_id":"31","source_row_sha256":"8dd0457cc634a17faa75420ec0ea392cb2cd71b62149c2831923d9308a2bdd21"},{"category":"Python","id":"mbpp-310","prompt":"Write a function to convert a given string to a tuple.\n\nSource prompt examples:\nassert string_to_tuple(\"python 3.0\")==('p', 'y', 't', 'h', 'o', 'n', '3', '.', '0')\nassert string_to_tuple(\"item1\")==('i', 't', 'e', 'm', '1')\nassert string_to_tuple(\"15.10\")==('1', '5', '.', '1', '0')","source_id":"310","source_row_sha256":"ae7c8d8008c3ea6688bc8a059e4792fe419989e8c3a2e3f61e2664ebde7b56dd"},{"category":"Python","id":"mbpp-311","prompt":"Write a python function to set the left most unset bit.\n\nSource prompt examples:\nassert set_left_most_unset_bit(10) == 14\nassert set_left_most_unset_bit(12) == 14\nassert set_left_most_unset_bit(15) == 15","source_id":"311","source_row_sha256":"4954ac0c36f1927fd86715b715071ec34963d64fba3e6d064600489e3d27635b"},{"category":"Python","id":"mbpp-312","prompt":"Write a function to find the volume of a cone.\n\nSource prompt examples:\nassert volume_cone(5,12)==314.15926535897927\nassert volume_cone(10,15)==1570.7963267948965\nassert volume_cone(19,17)==6426.651371693521","source_id":"312","source_row_sha256":"16f641c3b16f3742344df60d72db809e0fc106132fdb1f9ce97995a99384c800"},{"category":"Python","id":"mbpp-313","prompt":"Write a python function to print positive numbers in a list.\n\nSource prompt examples:\nassert pos_nos([-1,-2,1,2]) == 1,2\nassert pos_nos([3,4,-5]) == 3,4\nassert pos_nos([-2,-3,1]) == 1","source_id":"313","source_row_sha256":"7b4c5ea44567ed84e34516fc9ccaf744ffebeb2353af7035bb33420b89c4b713"},{"category":"Python","id":"mbpp-314","prompt":"Write a function to find out the maximum sum such that no two chosen numbers are adjacent for the given rectangular grid of dimension 2 x n.\n\nSource prompt examples:\nassert max_sum_rectangular_grid([ [1, 4, 5], [2, 0, 0 ] ], 3) == 7\nassert max_sum_rectangular_grid([ [ 1, 2, 3, 4, 5], [ 6, 7, 8, 9, 10] ], 5) == 24\nassert max_sum_rectangular_grid([ [7, 9, 11, 15, 19], [21, 25, 28, 31, 32] ], 5) == 81","source_id":"314","source_row_sha256":"d3ce72ee65335ded1aa446e88658cde8b3506b49cac9daf15825a0b09f3bdb03"},{"category":"Python","id":"mbpp-315","prompt":"Write a python function to find the first maximum length of even word.\n\nSource prompt examples:\nassert find_Max_Len_Even(\"python language\") == \"language\"\nassert find_Max_Len_Even(\"maximum even length\") == \"length\"\nassert find_Max_Len_Even(\"eve\") == \"-1\"","source_id":"315","source_row_sha256":"7806dc4d66adf134eb406b04465a13023d714d5731f55aac35820263e727e479"},{"category":"Python","id":"mbpp-316","prompt":"Write a function to find the index of the last occurrence of a given number in a sorted array.\n\nSource prompt examples:\nassert find_last_occurrence([2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 3\nassert find_last_occurrence([2, 3, 5, 8, 6, 6, 8, 9, 9, 9], 9) == 9\nassert find_last_occurrence([2, 2, 1, 5, 6, 6, 6, 9, 9, 9], 6) == 6","source_id":"316","source_row_sha256":"084aad9d28e9b5a4bf02e4f05f2b76defb51b1f07973aa9abbb556d6589cfb1e"},{"category":"Python","id":"mbpp-317","prompt":"Write a function to reflect the modified run-length encoding from a list.\n\nSource prompt examples:\nassert modified_encode([1,1,2,3,4,4,5,1])==[[2, 1], 2, 3, [2, 4], 5, 1]\nassert modified_encode('automatically')==['a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', 'a', [2, 'l'], 'y']\nassert modified_encode('python')==['p', 'y', 't', 'h', 'o', 'n']","source_id":"317","source_row_sha256":"071945fd5f46385f1c64fed5c78324f854f9c2e5f8fdb847f65a773a1c2d4ae9"},{"category":"Python","id":"mbpp-318","prompt":"Write a python function to find the maximum volume of a cuboid with given sum of sides.\n\nSource prompt examples:\nassert max_volume(8) == 18\nassert max_volume(4) == 2\nassert max_volume(1) == 0","source_id":"318","source_row_sha256":"35cdcbfbbc815d62783332b69a3c6c2054cf5de5905f630aa8bc6a5cdf211410"},{"category":"Python","id":"mbpp-319","prompt":"Write a function to find all five characters long word in the given string by using regex.\n\nSource prompt examples:\nassert find_long_word('Please move back to strem') == ['strem']\nassert find_long_word('4K Ultra HD streaming player') == ['Ultra']\nassert find_long_word('Streaming Media Player') == ['Media']","source_id":"319","source_row_sha256":"592e1e4de2a3f5fad9e2a8fda0098889b5fe5fc96cab3a5760b55a0d0e8569eb"},{"category":"Python","id":"mbpp-32","prompt":"Write a python function to find the largest prime factor of a given number.\n\nSource prompt examples:\nassert max_Prime_Factors(15) == 5\nassert max_Prime_Factors(6) == 3\nassert max_Prime_Factors(2) == 2","source_id":"32","source_row_sha256":"f2d6f3618f9f4b3b46ff193e059738a29e78eef187dafe393a9275a63d7fc063"},{"category":"Python","id":"mbpp-320","prompt":"Write a function to calculate the difference between the squared sum of first n natural numbers and the sum of squared first n natural numbers.\n\nSource prompt examples:\nassert sum_difference(12)==5434\nassert sum_difference(20)==41230\nassert sum_difference(54)==2151270","source_id":"320","source_row_sha256":"85fca6688d2b6b0480c94dd2e6e5cac82ab833342401b0e5ca6c3f8d0772c35d"},{"category":"Python","id":"mbpp-321","prompt":"Write a function to find the demlo number for the given number.\n\nSource prompt examples:\nassert find_demlo(\"111111\") == '12345654321'\nassert find_demlo(\"1111\") == '1234321'\nassert find_demlo(\"13333122222\") == '123456789101110987654321'","source_id":"321","source_row_sha256":"9fbf67a77052171ee9b6a1ed7e937eab6f80e0a9b451a42e665ca8bfbe51b613"},{"category":"Python","id":"mbpp-322","prompt":"Write a function to find all index positions of the minimum values in a given list.\n\nSource prompt examples:\nassert position_min([12,33,23,10,67,89,45,667,23,12,11,10,54])==[3,11]\nassert position_min([1,2,2,2,4,4,4,5,5,5,5])==[0]\nassert position_min([2,1,5,6,8,3,4,9,10,11,8,12])==[1]","source_id":"322","source_row_sha256":"64014e990de35a34743ac0f84dfd59dc37e8ff3fead48e78f977b9d4e95de521"},{"category":"Python","id":"mbpp-323","prompt":"Write a function to re-arrange the given array in alternating positive and negative items.\n\nSource prompt examples:\nassert re_arrange([-5, -2, 5, 2, 4,\t7, 1, 8, 0, -8], 10) == [-5, 5, -2, 2, -8, 4, 7, 1, 8, 0]\nassert re_arrange([1, 2, 3, -4, -1, 4], 6) == [-4, 1, -1, 2, 3, 4]\nassert re_arrange([4, 7, 9, 77, -4, 5, -3, -9], 8) == [-4, 4, -3, 7, -9, 9, 77, 5]","source_id":"323","source_row_sha256":"55c93691319cc747a2c0d197d5b294d8c2f620372f9e20bb927436fe3719fb35"},{"category":"Python","id":"mbpp-324","prompt":"Write a function to extract the sum of alternate chains of tuples.\n\nSource prompt examples:\nassert sum_of_alternates((5, 6, 3, 6, 10, 34)) == (46, 18)\nassert sum_of_alternates((1, 2, 3, 4, 5)) == (6, 9)\nassert sum_of_alternates((6, 7, 8, 9, 4, 5)) == (21, 18)","source_id":"324","source_row_sha256":"f8c61c2c67bbc3818589e8565f7f2f17a601da42275a601e276dcff4c65570db"},{"category":"Python","id":"mbpp-325","prompt":"Write a python function to find the minimum number of squares whose sum is equal to a given number.\n\nSource prompt examples:\nassert get_Min_Squares(6) == 3\nassert get_Min_Squares(2) == 2\nassert get_Min_Squares(4) == 1","source_id":"325","source_row_sha256":"156e0647f6d6df730dc9fd143451093f6b9f96607021cc81dd4822459ea217cb"},{"category":"Python","id":"mbpp-326","prompt":"Write a function to get the word with most number of occurrences in the given strings list.\n\nSource prompt examples:\nassert most_occurrences([\"UTS is best for RTF\", \"RTF love UTS\", \"UTS is best\"] ) == 'UTS'\nassert most_occurrences([\"Its been a great year\", \"this year is so worse\", \"this year is okay\"] ) == 'year'\nassert most_occurrences([\"Families can be reunited\", \"people can be reunited\", \"Tasks can be achieved \"] ) == 'can'","source_id":"326","source_row_sha256":"744a66f8b6683c79ad17635df1baee7af36ae58da119e14f91ac237270cbbd06"},{"category":"Python","id":"mbpp-327","prompt":"Write a function to print check if the triangle is isosceles or not.\n\nSource prompt examples:\nassert check_isosceles(6,8,12)==False \nassert check_isosceles(6,6,12)==True\nassert check_isosceles(6,16,20)==False","source_id":"327","source_row_sha256":"bdd2a78ca0c435b322f136bd236fdb128ce16a9b7682fc393004658891d7a422"},{"category":"Python","id":"mbpp-328","prompt":"Write a function to rotate a given list by specified number of items to the left direction.\n\nSource prompt examples:\nassert rotate_left([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],3,4)==[4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4]\nassert rotate_left([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],2,2)==[3, 4, 5, 6, 7, 8, 9, 10, 1, 2]\nassert rotate_left([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],5,2)==[6, 7, 8, 9, 10, 1, 2]","source_id":"328","source_row_sha256":"cbda861a40038e6e384a23a9931918df13a2d2a9821613c05176818f83cf3386"},{"category":"Python","id":"mbpp-329","prompt":"Write a python function to count negative numbers in a list.\n\nSource prompt examples:\nassert neg_count([-1,-2,3,-4,-5]) == 4\nassert neg_count([1,2,3]) == 0\nassert neg_count([1,2,-3,-10,20]) == 2","source_id":"329","source_row_sha256":"cbdad3143e78f1ad25c66162753125d8e725e5329ca455a4393689a71ad24469"},{"category":"Python","id":"mbpp-33","prompt":"Write a python function to convert a decimal number to binary number.\n\nSource prompt examples:\nassert decimal_To_Binary(10) == 1010\nassert decimal_To_Binary(1) == 1\nassert decimal_To_Binary(20) == 10100","source_id":"33","source_row_sha256":"26592a39068a17d2016a52f6c7bcb99c4da20c9267b4cf8730545bc0e13e1648"},{"category":"Python","id":"mbpp-330","prompt":"Write a function to find all three, four, five characters long words in the given string by using regex.\n\nSource prompt examples:\nassert find_char('For the four consumer complaints contact manager AKR reddy') == ['For', 'the', 'four', 'AKR', 'reddy']\nassert find_char('Certain service are subject to change MSR') == ['are', 'MSR']\nassert find_char('Third party legal desclaimers') == ['Third', 'party', 'legal']","source_id":"330","source_row_sha256":"f574411166bf663e9fb6e3b3627fa1a4516e7238e69220238412f2c24e343e3e"},{"category":"Python","id":"mbpp-331","prompt":"Write a python function to count unset bits of a given number.\n\nSource prompt examples:\nassert count_unset_bits(2) == 1\nassert count_unset_bits(4) == 2\nassert count_unset_bits(6) == 1","source_id":"331","source_row_sha256":"9d5e51157fb81de399df8b7cf8ee49d7bcccc0e2dc262063329367d8e3a70b48"},{"category":"Python","id":"mbpp-332","prompt":"Write a function to count character frequency of a given string.\n\nSource prompt examples:\nassert char_frequency('python')=={'p': 1, 'y': 1, 't': 1, 'h': 1, 'o': 1, 'n': 1}\nassert char_frequency('program')=={'p': 1, 'r': 2, 'o': 1, 'g': 1, 'a': 1, 'm': 1}\nassert char_frequency('language')=={'l': 1, 'a': 2, 'n': 1, 'g': 2, 'u': 1, 'e': 1}","source_id":"332","source_row_sha256":"2553024025fc4f5327ec39c13195bdbd2d1caea0ee31317c9d00787763cb4f42"},{"category":"Python","id":"mbpp-333","prompt":"Write a python function to sort a list according to the second element in sublist.\n\nSource prompt examples:\nassert Sort([['a', 10], ['b', 5], ['c', 20], ['d', 15]]) == [['b', 5], ['a', 10], ['d', 15], ['c', 20]]\nassert Sort([['452', 10], ['256', 5], ['100', 20], ['135', 15]]) == [['256', 5], ['452', 10], ['135', 15], ['100', 20]]\nassert Sort([['rishi', 10], ['akhil', 5], ['ramya', 20], ['gaur', 15]]) == [['akhil', 5], ['rishi', 10], ['gaur', 15], ['ramya', 20]]","source_id":"333","source_row_sha256":"a6f6c2af46f2eab2c3fe6e2e91d33c694cf30e00f073af2eaa731504a1515a5a"},{"category":"Python","id":"mbpp-334","prompt":"Write a python function to check whether the triangle is valid or not if sides are given.\n\nSource prompt examples:\nassert check_Validity(1,2,3) == False\nassert check_Validity(2,3,5) == False\nassert check_Validity(7,10,5) == True","source_id":"334","source_row_sha256":"7827f207bdae7b9a6a2192b9dbd0cf6aadd79bbb8273f6a91b68027a3e889c0b"},{"category":"Python","id":"mbpp-335","prompt":"Write a function to find the sum of arithmetic progression.\n\nSource prompt examples:\nassert ap_sum(1,5,2)==25\nassert ap_sum(2,6,4)==72\nassert ap_sum(1,4,5)==34","source_id":"335","source_row_sha256":"01e660963b8952ed37e7a580f05f2f6a4ca64f1ca501b35438b63696d5ec6d89"},{"category":"Python","id":"mbpp-336","prompt":"Write a function to check whether the given month name contains 28 days or not.\n\nSource prompt examples:\nassert check_monthnum(\"February\")==True\nassert check_monthnum(\"January\")==False\nassert check_monthnum(\"March\")==False","source_id":"336","source_row_sha256":"1a3e8b48fd18ab157db1f7a7661931f914ccc9f5b6cd3f6754b1c8cb4b07e58e"},{"category":"Python","id":"mbpp-337","prompt":"Write a function that matches a word at the end of a string, with optional punctuation.\n\nSource prompt examples:\nassert text_match_word(\"python.\")==('Found a match!')\nassert text_match_word(\"python.\")==('Found a match!')\nassert text_match_word(\"  lang  .\")==('Not matched!')","source_id":"337","source_row_sha256":"0801efaa3a1bbc2de5dd7d5fc148901bb8ad4b27859235e98f238b9949548452"},{"category":"Python","id":"mbpp-338","prompt":"Write a python function to count the number of substrings with same first and last characters.\n\nSource prompt examples:\nassert count_Substring_With_Equal_Ends('aba') == 4\nassert count_Substring_With_Equal_Ends('abcab') == 7\nassert count_Substring_With_Equal_Ends('abc') == 3","source_id":"338","source_row_sha256":"ecc2055e83d7b69f32f8637ea3bc91c624650dbe1134393f35cb4828347b553d"},{"category":"Python","id":"mbpp-339","prompt":"Write a python function to find the maximum occuring divisor in an interval.\n\nSource prompt examples:\nassert find_Divisor(2,2) == 2\nassert find_Divisor(2,5) == 2\nassert find_Divisor(5,10) == 2","source_id":"339","source_row_sha256":"f958792aa97099ac33d4c4866557f9796488a5f215ab85fa402b1fa7c7962814"},{"category":"Python","id":"mbpp-34","prompt":"Write a python function to find the missing number in a sorted array.\n\nSource prompt examples:\nassert find_missing([1,2,3,5],4) == 4\nassert find_missing([1,3,4,5],4) == 2\nassert find_missing([1,2,3,5,6,7],5) == 4","source_id":"34","source_row_sha256":"27ac4a135991f21ca9db4a6bf93d11c92008964e5d1fc87ff75250e4acde76c7"},{"category":"Python","id":"mbpp-340","prompt":"Write a python function to find the sum of the three lowest positive numbers from a given list of numbers.\n\nSource prompt examples:\nassert sum_three_smallest_nums([10,20,30,40,50,60,7]) == 37\nassert sum_three_smallest_nums([1,2,3,4,5]) == 6\nassert sum_three_smallest_nums([0,1,2,3,4,5]) == 6","source_id":"340","source_row_sha256":"4734fdf472a73f3f837ac771527e0b07e1d8f16791c856e414c7320701b9da26"},{"category":"Python","id":"mbpp-341","prompt":"Write a function to convert the given set into ordered tuples.\n\nSource prompt examples:\nassert set_to_tuple({1, 2, 3, 4, 5}) == (1, 2, 3, 4, 5)\nassert set_to_tuple({6, 7, 8, 9, 10, 11}) == (6, 7, 8, 9, 10, 11)\nassert set_to_tuple({12, 13, 14, 15, 16}) == (12, 13, 14, 15, 16)","source_id":"341","source_row_sha256":"26bec2082e3bdca8c27412f00629834a0fc86af93ba34d71dd9b8277f31a1d9f"},{"category":"Python","id":"mbpp-342","prompt":"Write a function to find the smallest range that includes at-least one element from each of the given arrays.\n\nSource prompt examples:\nassert find_minimum_range([[3, 6, 8, 10, 15], [1, 5, 12], [4, 8, 15, 16], [2, 6]]) == (4, 6)\nassert find_minimum_range([[ 2, 3, 4, 8, 10, 15 ], [1, 5, 12], [7, 8, 15, 16], [3, 6]]) == (4, 7)\nassert find_minimum_range([[4, 7, 9, 11, 16], [2, 6, 13], [5, 9, 16, 17], [3, 7]]) == (5, 7)","source_id":"342","source_row_sha256":"b619fbaeb529ade01b70cc1ef733d9e7e0c5e7489d5cf63e55a4702948094162"},{"category":"Python","id":"mbpp-343","prompt":"Write a function to calculate the number of digits and letters in a string.\n\nSource prompt examples:\nassert dig_let(\"python\")==(6,0)\nassert dig_let(\"program\")==(7,0)\nassert dig_let(\"python3.0\")==(6,2)","source_id":"343","source_row_sha256":"cd3c6a433d1ab3748cd03b67317ac02642d725fa5d881049cb4ac2ded3f33f2c"},{"category":"Python","id":"mbpp-344","prompt":"Write a python function to find number of elements with odd factors in a given range.\n\nSource prompt examples:\nassert count_Odd_Squares(5,100) == 8\nassert count_Odd_Squares(8,65) == 6\nassert count_Odd_Squares(2,5) == 1","source_id":"344","source_row_sha256":"6196712708c725b0354070b5ce250cbf5e7a292eb20a84c71fae0cccb8a342f4"},{"category":"Python","id":"mbpp-345","prompt":"Write a function to find the difference between two consecutive numbers in a given list.\n\nSource prompt examples:\nassert diff_consecutivenums([1, 1, 3, 4, 4, 5, 6, 7])==[0, 2, 1, 0, 1, 1, 1]\nassert diff_consecutivenums([4, 5, 8, 9, 6, 10])==[1, 3, 1, -3, 4]\nassert diff_consecutivenums([0, 1, 2, 3, 4, 4, 4, 4, 5, 7])==[1, 1, 1, 1, 0, 0, 0, 1, 2]","source_id":"345","source_row_sha256":"41b6f3ca9aa28ffeed603c4335b25b9a8797da11c8a6d5807aa33c7348f00f26"},{"category":"Python","id":"mbpp-346","prompt":"Write a function to find entringer number e(n, k).\n\nSource prompt examples:\nassert zigzag(4, 3) == 5\nassert zigzag(4, 2) == 4\nassert zigzag(3, 1) == 1","source_id":"346","source_row_sha256":"24153b1e155e136955e2014207064ec13f0f4ece095c7b6554bab435fd3d3f9b"},{"category":"Python","id":"mbpp-347","prompt":"Write a python function to count the number of squares in a rectangle.\n\nSource prompt examples:\nassert count_Squares(4,3) == 20\nassert count_Squares(1,2) == 2\nassert count_Squares(2,2) == 5","source_id":"347","source_row_sha256":"c6f199798d1445eeb64484c6644d3de9f30d5dc3d059a87213be70a8ae04f028"},{"category":"Python","id":"mbpp-348","prompt":"Write a function to count sequences of given length having non-negative prefix sums that can be generated by given values.\n\nSource prompt examples:\nassert find_ways(4) == 2\nassert find_ways(6) == 5\nassert find_ways(8) == 14","source_id":"348","source_row_sha256":"4efd5e8b5802ff6ee8ffc832c8a1c204f6430fa1b817c3464a37294acff1b78f"},{"category":"Python","id":"mbpp-349","prompt":"Write a python function to check whether the given string is a binary string or not.\n\nSource prompt examples:\nassert check(\"01010101010\") == \"Yes\"\nassert check(\"name0\") == \"No\"\nassert check(\"101\") == \"Yes\"","source_id":"349","source_row_sha256":"5124874d851e36b26b994420bd1f9f92ca88f40c5de37a27cf6efbdcf7665344"},{"category":"Python","id":"mbpp-35","prompt":"Write a function to find the n-th rectangular number.\n\nSource prompt examples:\nassert find_rect_num(4) == 20\nassert find_rect_num(5) == 30\nassert find_rect_num(6) == 42","source_id":"35","source_row_sha256":"4cb3c58f6249a6b01600ad4490591dd29b51c1d2824b6f39763f6106e6a02cd6"},{"category":"Python","id":"mbpp-350","prompt":"Write a python function to minimize the length of the string by removing occurrence of only one character.\n\nSource prompt examples:\nassert minimum_Length(\"mnm\") == 1\nassert minimum_Length(\"abcda\") == 3\nassert minimum_Length(\"abcb\") == 2","source_id":"350","source_row_sha256":"7973c1be9b64f107e31f0d8db5b26713234440a98fc5fc7d1c72651fbf98dcbb"},{"category":"Python","id":"mbpp-351","prompt":"Write a python function to find the first element occurring k times in a given array.\n\nSource prompt examples:\nassert first_Element([0,1,2,3,4,5],6,1) == 0\nassert first_Element([1,2,1,3,4],5,2) == 1\nassert first_Element([2,3,4,3,5,7,1,2,3,5],10,2) == 2","source_id":"351","source_row_sha256":"1c7e64a53d22e667a1a6fd32282c3e39ec1a37434d258db5be9af26c3e63331a"},{"category":"Python","id":"mbpp-352","prompt":"Write a python function to check whether all the characters in a given string are unique.\n\nSource prompt examples:\nassert unique_Characters('aba') == False\nassert unique_Characters('abc') == True\nassert unique_Characters('abab') == False","source_id":"352","source_row_sha256":"b68c802a68ad353f067cd358c06b42759d621edf345bcbd9a648182e534446a6"},{"category":"Python","id":"mbpp-353","prompt":"Write a function to remove a specified column from a given nested list.\n\nSource prompt examples:\nassert remove_column([[1, 2, 3], [2, 4, 5], [1, 1, 1]],0)==[[2, 3], [4, 5], [1, 1]]\nassert remove_column([[1, 2, 3], [-2, 4, -5], [1, -1, 1]],2)==[[1, 2], [-2, 4], [1, -1]]\nassert remove_column([[1, 3], [5, 7], [1, 3], [13, 15, 17], [5, 7], [9, 11]],0)==[[3], [7], [3], [15, 17], [7], [11]]","source_id":"353","source_row_sha256":"94172089c625182a6951d1323a4e09fb9fb1d86c948ab9c001a0eb96d96df053"},{"category":"Python","id":"mbpp-354","prompt":"Write a function to find t-nth term of arithemetic progression.\n\nSource prompt examples:\nassert tn_ap(1,5,2)==9\nassert tn_ap(2,6,4)==22\nassert tn_ap(1,4,5)==16","source_id":"354","source_row_sha256":"209912f717a0a87795b1f1333502f3203771c283344b15bde337cef8dc69db2c"},{"category":"Python","id":"mbpp-355","prompt":"Write a python function to count the number of rectangles in a circle of radius r.\n\nSource prompt examples:\nassert count_Rectangles(2) == 8\nassert count_Rectangles(1) == 1\nassert count_Rectangles(0) == 0","source_id":"355","source_row_sha256":"f8e2310f8a2656d3d93fb81599e823ade5551eb3c7be6ceb01a989f720997b0f"},{"category":"Python","id":"mbpp-356","prompt":"Write a function to find the third angle of a triangle using two angles.\n\nSource prompt examples:\nassert find_angle(47,89)==44\nassert find_angle(45,95)==40\nassert find_angle(50,40)==90","source_id":"356","source_row_sha256":"df9c7c4415e24d3c388f8ffa85bd28f202b8585a0aa92b7e79f8cae3f221d38c"},{"category":"Python","id":"mbpp-357","prompt":"Write a function to find the maximum element of all the given tuple records.\n\nSource prompt examples:\nassert find_max([(2, 4), (6, 7), (5, 1), (6, 10), (8, 7)]) == 10\nassert find_max([(3, 5), (7, 8), (6, 2), (7, 11), (9, 8)]) == 11\nassert find_max([(4, 6), (8, 9), (7, 3), (8, 12), (10, 9)]) == 12","source_id":"357","source_row_sha256":"dc85fd7fdbc9323c28ab4f3b08bb45404325488268bec99da35c708a66d79237"},{"category":"Python","id":"mbpp-358","prompt":"Write a function to find modulo division of two lists using map and lambda function.\n\nSource prompt examples:\nassert moddiv_list([4,5,6],[1, 2, 3])==[0, 1, 0]\nassert moddiv_list([3,2],[1,4])==[0, 2]\nassert moddiv_list([90,120],[50,70])==[40, 50]","source_id":"358","source_row_sha256":"4764f554fc55a26a76fc21a3051571c6ae0d16191f494af4176ab88b7fd1fd7d"},{"category":"Python","id":"mbpp-359","prompt":"Write a python function to check whether one root of the quadratic equation is twice of the other or not.\n\nSource prompt examples:\nassert Check_Solution(1,3,2) == \"Yes\"\nassert Check_Solution(1,2,3) == \"No\"\nassert Check_Solution(1,-5,6) == \"No\"","source_id":"359","source_row_sha256":"757e6272e8d116ca0f9e2844217dcd22c594790b6dda0723ffe640da0f348959"},{"category":"Python","id":"mbpp-36","prompt":"Write a python function to find the nth digit in the proper fraction of two given numbers.\n\nSource prompt examples:\nassert find_Nth_Digit(1,2,1) == 5\nassert find_Nth_Digit(3,5,1) == 6\nassert find_Nth_Digit(5,6,5) == 3","source_id":"36","source_row_sha256":"deeaa71497d999db7a26a139420a51ca819a452a14c474e2d8a30f1e550eab1e"},{"category":"Python","id":"mbpp-360","prompt":"Write a function to find the n’th carol number.\n\nSource prompt examples:\nassert get_carol(2) == 7\nassert get_carol(4) == 223\nassert get_carol(5) == 959","source_id":"360","source_row_sha256":"8f84cf0e10742064149c88e88a4198f4fd72d5ec33dd844ad03320100172d51e"},{"category":"Python","id":"mbpp-361","prompt":"Write a function to remove empty lists from a given list of lists.\n\nSource prompt examples:\nassert remove_empty([[], [], [], 'Red', 'Green', [1,2], 'Blue', [], []])==['Red', 'Green', [1, 2], 'Blue']\nassert remove_empty([[], [], [],[],[], 'Green', [1,2], 'Blue', [], []])==[ 'Green', [1, 2], 'Blue']\nassert remove_empty([[], [], [], 'Python',[],[], 'programming', 'language',[],[],[], [], []])==['Python', 'programming', 'language']","source_id":"361","source_row_sha256":"a2691ad6fcc67a447522ba3542d50f33ea6855a21dd9622bd2514aae234ed041"},{"category":"Python","id":"mbpp-362","prompt":"Write a python function to find the item with maximum occurrences in a given list.\n\nSource prompt examples:\nassert max_occurrences([1,2,3,1,2,3,12,4,2]) ==  2\nassert max_occurrences([1,2,6,7,0,1,0,1,0]) == 1,0\nassert max_occurrences([1,2,3,1,2,4,1]) == 1","source_id":"362","source_row_sha256":"9a9233c02d273af6e1c0bd960a3be70bc48227bb6089c0198306525c9be05b2f"},{"category":"Python","id":"mbpp-363","prompt":"Write a function to add the k elements to each element in the tuple.\n\nSource prompt examples:\nassert add_K_element([(1, 3, 4), (2, 4, 6), (3, 8, 1)], 4) == [(5, 7, 8), (6, 8, 10), (7, 12, 5)]\nassert add_K_element([(1, 2, 3), (4, 5, 6), (7, 8, 9)], 8) == [(9, 10, 11), (12, 13, 14), (15, 16, 17)]\nassert add_K_element([(11, 12, 13), (14, 15, 16), (17, 18, 19)], 9) == [(20, 21, 22), (23, 24, 25), (26, 27, 28)]","source_id":"363","source_row_sha256":"da945413b89d941bbc5f35c522e662e1df5ceabf14efff7cc972eba4527f514c"},{"category":"Python","id":"mbpp-364","prompt":"Write a function to find the number of flips required to make the given binary string a sequence of alternate characters.\n\nSource prompt examples:\nassert min_flip_to_make_string_alternate(\"0001010111\") == 2\nassert min_flip_to_make_string_alternate(\"001\") == 1\nassert min_flip_to_make_string_alternate(\"010111011\") == 2 ","source_id":"364","source_row_sha256":"de42bdf30fc48379981191df53855e84f6b7c15e0b671c2c45db20b3cdae2913"},{"category":"Python","id":"mbpp-365","prompt":"Write a python function to count the number of digits of a given number.\n\nSource prompt examples:\nassert count_Digit(12345) == 5\nassert count_Digit(11223305) == 8\nassert count_Digit(4123459) == 7","source_id":"365","source_row_sha256":"599e34a2e260fd209b5422b06144baad6be6d67c3fc20d1c93c713ac25243bd7"},{"category":"Python","id":"mbpp-366","prompt":"Write a python function to find the largest product of the pair of adjacent elements from a given list of integers.\n\nSource prompt examples:\nassert adjacent_num_product([1,2,3,4,5,6]) == 30\nassert adjacent_num_product([1,2,3,4,5]) == 20\nassert adjacent_num_product([2,3]) == 6","source_id":"366","source_row_sha256":"d8203af5185cd768701c52fb0f231789c044d68bc1062d652ca667463a8f1923"},{"category":"Python","id":"mbpp-367","prompt":"Write a function to check if a binary tree is balanced or not.\n\nSource prompt examples:\nassert is_tree_balanced(root) == False\nassert is_tree_balanced(root1) == True\nassert is_tree_balanced(root2) == False ","source_id":"367","source_row_sha256":"8a6dff38a94ccd56da551453e1e9e24eb02d8e617ab7e4c109f535c75664be87"},{"category":"Python","id":"mbpp-368","prompt":"Write a function to repeat the given tuple n times.\n\nSource prompt examples:\nassert repeat_tuples((1, 3), 4) == ((1, 3), (1, 3), (1, 3), (1, 3))\nassert repeat_tuples((1, 2), 3) == ((1, 2), (1, 2), (1, 2))\nassert repeat_tuples((3, 4), 5) == ((3, 4), (3, 4), (3, 4), (3, 4), (3, 4))","source_id":"368","source_row_sha256":"41143ca8e9aefc5170e659f8290a336898e06721efffc61bb790ec4d827d13e2"},{"category":"Python","id":"mbpp-369","prompt":"Write a function to find the lateral surface area of cuboid\n\nSource prompt examples:\nassert lateralsurface_cuboid(8,5,6)==156\nassert lateralsurface_cuboid(7,9,10)==320\nassert lateralsurface_cuboid(10,20,30)==1800","source_id":"369","source_row_sha256":"235f1a866bb6351cb9ee6cc4fd6c90fc71c9549621a653cca54a837e70a78d76"},{"category":"Python","id":"mbpp-37","prompt":"Write a function to sort a given mixed list of integers and strings.\n\nSource prompt examples:\nassert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']\nassert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']\nassert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']","source_id":"37","source_row_sha256":"d28eb02a0e3948c97cb85107a9bc2cea214a9ac0866264bde2b9941dc7d030aa"},{"category":"Python","id":"mbpp-370","prompt":"Write a function to sort a tuple by its float element.\n\nSource prompt examples:\nassert float_sort([('item1', '12.20'), ('item2', '15.10'), ('item3', '24.5')])==[('item3', '24.5'), ('item2', '15.10'), ('item1', '12.20')] \nassert float_sort([('item1', '15'), ('item2', '10'), ('item3', '20')])==[('item3', '20'), ('item1', '15'), ('item2', '10')] \nassert float_sort([('item1', '5'), ('item2', '10'), ('item3', '14')])==[('item3', '14'), ('item2', '10'), ('item1', '5')] ","source_id":"370","source_row_sha256":"7a4a2af435f2394ef81b35aad8b4fd24f454efc83740eea4a76855922e75e94e"},{"category":"Python","id":"mbpp-371","prompt":"Write a function to find the smallest missing element in a sorted array.\n\nSource prompt examples:\nassert smallest_missing([0, 1, 2, 3, 4, 5, 6], 0, 6) == 7\nassert smallest_missing([0, 1, 2, 6, 9, 11, 15], 0, 6) == 3\nassert smallest_missing([1, 2, 3, 4, 6, 9, 11, 15], 0, 7) == 0","source_id":"371","source_row_sha256":"36993698f0599ca5cebf0227458cc775aa12d442d00b82ad55ba6f3ceae8dbc4"},{"category":"Python","id":"mbpp-372","prompt":"Write a function to sort a given list of elements in ascending order using heap queue algorithm.\n\nSource prompt examples:\nassert heap_assending([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1])==[1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18]\nassert heap_assending([25, 35, 22, 85, 14, 65, 75, 25, 58])==[14, 22, 25, 25, 35, 58, 65, 75, 85]\nassert heap_assending([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]","source_id":"372","source_row_sha256":"9c3a9ee60394d517a4a24aca50412ec7150fd1cc295042e7346712936b1ad144"},{"category":"Python","id":"mbpp-373","prompt":"Write a function to find the volume of a cuboid.\n\nSource prompt examples:\nassert volume_cuboid(1,2,3)==6\nassert volume_cuboid(5,7,9)==315\nassert volume_cuboid(10,15,21)==3150","source_id":"373","source_row_sha256":"8835d0db50ef4f9a405468d3d83c4c4a6586ffdd46a77f524d90db9d15cf814b"},{"category":"Python","id":"mbpp-374","prompt":"Write a function to print all permutations of a given string including duplicates.\n\nSource prompt examples:\nassert permute_string('ab')==['ab', 'ba']\nassert permute_string('abc')==['abc', 'bac', 'bca', 'acb', 'cab', 'cba']\nassert permute_string('abcd')==['abcd', 'bacd', 'bcad', 'bcda', 'acbd', 'cabd', 'cbad', 'cbda', 'acdb', 'cadb', 'cdab', 'cdba', 'abdc', 'badc', 'bdac', 'bdca', 'adbc', 'dabc', 'dbac', 'dbca', 'adcb', 'dacb', 'dcab', 'dcba']","source_id":"374","source_row_sha256":"8c404950018ed50cf358ebb3fccd092a0e664f6d5e605a95bceed7082c5e9a8c"},{"category":"Python","id":"mbpp-375","prompt":"Write a function to round the given number to the nearest multiple of a specific number.\n\nSource prompt examples:\nassert round_num(4722,10)==4720\nassert round_num(1111,5)==1110\nassert round_num(219,2)==218","source_id":"375","source_row_sha256":"7b5d17ab7d69acfb5c5f7c4a4abafd53ed73348ce9982257fb5a7be55a5bafd1"},{"category":"Python","id":"mbpp-376","prompt":"Write a function to remove tuple elements that occur more than once and replace the duplicates with some custom value.\n\nSource prompt examples:\nassert remove_replica((1, 1, 4, 4, 4, 5, 5, 6, 7, 7)) == (1, 'MSP', 4, 'MSP', 'MSP', 5, 'MSP', 6, 7, 'MSP')\nassert remove_replica((2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9)) == (2, 3, 4, 'MSP', 5, 6, 'MSP', 7, 8, 9, 'MSP')\nassert remove_replica((2, 2, 5, 4, 5, 7, 5, 6, 7, 7)) == (2, 'MSP', 5, 4, 'MSP', 7, 'MSP', 6, 'MSP', 'MSP')","source_id":"376","source_row_sha256":"73565c48fd4ee35564d3c9a5a4f5af236b0eddc3f00d55787f4cf676fda63290"},{"category":"Python","id":"mbpp-377","prompt":"Write a python function to remove all occurrences of a character in a given string.\n\nSource prompt examples:\nassert remove_Char(\"aba\",'a') == \"b\"\nassert remove_Char(\"toggle\",'g') == \"tole\"\nassert remove_Char(\"aabbc\",'b') == \"aac\"","source_id":"377","source_row_sha256":"8e6160ed26f806849964389ea86217e2aacd63d1759528c89f5c6b2239bf1c96"},{"category":"Python","id":"mbpp-378","prompt":"Write a python function to shift last element to first position in the given list.\n\nSource prompt examples:\nassert move_first([1,2,3,4]) == [4,1,2,3]\nassert move_first([0,1,2,3]) == [3,0,1,2]\nassert move_first([9,8,7,1]) == [1,9,8,7]","source_id":"378","source_row_sha256":"660522cd25e778b617eb14ddfe41c08eee3638fb7c919367ae898a7df93b52e5"},{"category":"Python","id":"mbpp-379","prompt":"Write a function to find the surface area of a cuboid.\n\nSource prompt examples:\nassert surfacearea_cuboid(1,2,3)==22\nassert surfacearea_cuboid(5,7,9)==286\nassert surfacearea_cuboid(10,15,21)==1350","source_id":"379","source_row_sha256":"216e85c97896710727d1ab70ff873d53096d81117219438a62c4b1b707ce4432"},{"category":"Python","id":"mbpp-38","prompt":"Write a function to find the division of first even and odd number of a given list.\n\nSource prompt examples:\nassert div_even_odd([1,3,5,7,4,1,6,8])==4\nassert div_even_odd([1,2,3,4,5,6,7,8,9,10])==2\nassert div_even_odd([1,5,7,9,10])==10","source_id":"38","source_row_sha256":"e40b4a934f5fc9126ae942b06cd55d3fd052c29a6bfe58252a31b98da2dbd219"},{"category":"Python","id":"mbpp-380","prompt":"Write a function to generate a two-dimensional array.\n\nSource prompt examples:\nassert multi_list(3,4)==[[0, 0, 0, 0], [0, 1, 2, 3], [0, 2, 4, 6]] \nassert multi_list(5,7)==[[0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 4, 5, 6], [0, 2, 4, 6, 8, 10, 12], [0, 3, 6, 9, 12, 15, 18], [0, 4, 8, 12, 16, 20, 24]]\nassert multi_list(10,15)==[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28], [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42], [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56], [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70], [0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84], [0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98], [0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112], [0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126]]","source_id":"380","source_row_sha256":"844eae81b6c3a060ce1b0117d56f2658458506aca9f1b2860cb4d045daae00ae"},{"category":"Python","id":"mbpp-381","prompt":"Write a function to sort a list of lists by a given index of the inner list.\n\nSource prompt examples:\nassert index_on_inner_list([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,0)==[('Beau Turnbull', 94, 98), ('Brady Kent', 97, 96), ('Greyson Fulton', 98, 99), ('Wyatt Knott', 91, 94)]\nassert index_on_inner_list([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,1)==[('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98), ('Brady Kent', 97, 96), ('Greyson Fulton', 98, 99)]\nassert index_on_inner_list([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,2)==[('Wyatt Knott', 91, 94), ('Brady Kent', 97, 96), ('Beau Turnbull', 94, 98), ('Greyson Fulton', 98, 99)]","source_id":"381","source_row_sha256":"9760ae665b8f42e7ed1bcf64c6571640f3ca7cab4eb6182e2b8688e0ac43badf"},{"category":"Python","id":"mbpp-382","prompt":"Write a function to find the number of rotations in a circularly sorted array.\n\nSource prompt examples:\nassert find_rotation_count([8, 9, 10, 1, 2, 3, 4, 5, 6, 7]) == 3\nassert find_rotation_count([8, 9, 10,2, 5, 6]) == 3\nassert find_rotation_count([2, 5, 6, 8, 9, 10]) == 0","source_id":"382","source_row_sha256":"080e806bd31d16f053f3a2dd551d3b316f943164d2c4ac01250a5790ca00b8b4"},{"category":"Python","id":"mbpp-383","prompt":"Write a python function to toggle all odd bits of a given number.\n\nSource prompt examples:\nassert even_bit_toggle_number(10) == 15\nassert even_bit_toggle_number(20) == 1\nassert even_bit_toggle_number(30) == 11","source_id":"383","source_row_sha256":"333253d3af16c5176ebb1f51b01620a858d9311a72104fb013f93b610f3ad0f3"},{"category":"Python","id":"mbpp-384","prompt":"Write a python function to find the frequency of the smallest value in a given array.\n\nSource prompt examples:\nassert frequency_Of_Smallest(5,[1,2,3,4,3]) == 1\nassert frequency_Of_Smallest(7,[3,1,2,5,6,2,3]) == 1\nassert frequency_Of_Smallest(7,[3,3,6,3,7,4,9]) == 3","source_id":"384","source_row_sha256":"b587b90051ec4b284ae719419dee5a344ee50257128eb9145cc9fa7c0cae714d"},{"category":"Python","id":"mbpp-385","prompt":"Write a function to find the n'th perrin number using recursion.\n\nSource prompt examples:\nassert get_perrin(9) == 12\nassert get_perrin(4) == 2\nassert get_perrin(6) == 5","source_id":"385","source_row_sha256":"065f43ec63ff9ddccf5adef57fab862636f3688a0488cc18ee29b9ec53aa7e03"},{"category":"Python","id":"mbpp-386","prompt":"Write a function to find out the minimum no of swaps required for bracket balancing in the given string.\n\nSource prompt examples:\nassert swap_count(\"[]][][\") == 2\nassert swap_count(\"[[][]]\") == 0\nassert swap_count(\"[[][]]][\") == 1","source_id":"386","source_row_sha256":"e96b4398e96e5f602ea23e8d98fabdcbbc570795c4e0bddb1ca6781dbe62f4a3"},{"category":"Python","id":"mbpp-387","prompt":"Write a python function to check whether the hexadecimal number is even or odd.\n\nSource prompt examples:\nassert even_or_odd(\"AB3454D\") ==\"Odd\"\nassert even_or_odd(\"ABC\") == \"Even\"\nassert even_or_odd(\"AAD\") == \"Odd\"","source_id":"387","source_row_sha256":"884aa9064fceecedd4e9fe5a1ffbd8e2c7f4d84c852f0dcdbdf72291ebe873dd"},{"category":"Python","id":"mbpp-388","prompt":"Write a python function to find the highest power of 2 that is less than or equal to n.\n\nSource prompt examples:\nassert highest_Power_of_2(10) == 8\nassert highest_Power_of_2(19) == 16\nassert highest_Power_of_2(32) == 32","source_id":"388","source_row_sha256":"6d3b787fc698af0aedd5a139c4bdc7c4dc250d340e781ef188a184d49528ad2d"},{"category":"Python","id":"mbpp-389","prompt":"Write a function to find the n'th lucas number.\n\nSource prompt examples:\nassert find_lucas(9) == 76\nassert find_lucas(4) == 7\nassert find_lucas(3) == 4","source_id":"389","source_row_sha256":"77d44eea4f192df75f4e4c4dfb8681b029776c6386e93ca925684f139af8fb93"},{"category":"Python","id":"mbpp-39","prompt":"Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.\n\nSource prompt examples:\nassert rearange_string(\"aab\")==('aba')\nassert rearange_string(\"aabb\")==('abab')\nassert rearange_string(\"abccdd\")==('cdabcd')","source_id":"39","source_row_sha256":"6a89fb0847e990d9e67188ffc08301ae0186b06fc581e8ab6f4738ed1506b579"},{"category":"Python","id":"mbpp-390","prompt":"Write a function to insert a given string at the beginning of all items in a list.\n\nSource prompt examples:\nassert add_string([1,2,3,4],'temp{0}')==['temp1', 'temp2', 'temp3', 'temp4']\nassert add_string(['a','b','c','d'], 'python{0}')==[ 'pythona', 'pythonb', 'pythonc', 'pythond']\nassert add_string([5,6,7,8],'string{0}')==['string5', 'string6', 'string7', 'string8']","source_id":"390","source_row_sha256":"7cbe9facae5d6cbab2ed91b22acc1e756b109a2f4c1128897477c037e385904b"},{"category":"Python","id":"mbpp-391","prompt":"Write a function to convert more than one list to nested dictionary.\n\nSource prompt examples:\nassert convert_list_dictionary([\"S001\", \"S002\", \"S003\", \"S004\"],[\"Adina Park\", \"Leyton Marsh\", \"Duncan Boyle\", \"Saim Richards\"] ,[85, 98, 89, 92])==[{'S001': {'Adina Park': 85}}, {'S002': {'Leyton Marsh': 98}}, {'S003': {'Duncan Boyle': 89}}, {'S004': {'Saim Richards': 92}}]\nassert convert_list_dictionary([\"abc\",\"def\",\"ghi\",\"jkl\"],[\"python\",\"program\",\"language\",\"programs\"],[100,200,300,400])==[{'abc':{'python':100}},{'def':{'program':200}},{'ghi':{'language':300}},{'jkl':{'programs':400}}]\nassert convert_list_dictionary([\"A1\",\"A2\",\"A3\",\"A4\"],[\"java\",\"C\",\"C++\",\"DBMS\"],[10,20,30,40])==[{'A1':{'java':10}},{'A2':{'C':20}},{'A3':{'C++':30}},{'A4':{'DBMS':40}}]","source_id":"391","source_row_sha256":"8af1052e308301bdf212161f989fcbbdea33ca18cf801c04195d9abdaae18cb5"},{"category":"Python","id":"mbpp-392","prompt":"Write a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\n\nSource prompt examples:\nassert get_max_sum(60) == 106\nassert get_max_sum(10) == 12\nassert get_max_sum(2) == 2","source_id":"392","source_row_sha256":"ac0fd55c94baa47b67bbecd98ec6c4996a9378a49a1984f5ba57eb1a4abea03f"},{"category":"Python","id":"mbpp-393","prompt":"Write a function to find the list with maximum length using lambda function.\n\nSource prompt examples:\nassert max_length_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(3, [13, 15, 17])\nassert max_length_list([[1,2,3,4,5],[1,2,3,4],[1,2,3],[1,2],[1]])==(5,[1,2,3,4,5])\nassert max_length_list([[3,4,5],[6,7,8,9],[10,11,12]])==(4,[6,7,8,9])","source_id":"393","source_row_sha256":"5d9e8b22eb3ddc57e7f5d50760ae0bf55d4158990f5448d1f85544100494b920"},{"category":"Python","id":"mbpp-394","prompt":"Write a function to check if given tuple is distinct or not.\n\nSource prompt examples:\nassert check_distinct((1, 4, 5, 6, 1, 4)) == False\nassert check_distinct((1, 4, 5, 6)) == True\nassert check_distinct((2, 3, 4, 5, 6)) == True","source_id":"394","source_row_sha256":"acf54862289b457717b155431187279f93ed56bb87a4bced6451e35d2cbab595"},{"category":"Python","id":"mbpp-395","prompt":"Write a python function to find the first non-repeated character in a given string.\n\nSource prompt examples:\nassert first_non_repeating_character(\"abcabc\") == None\nassert first_non_repeating_character(\"abc\") == \"a\"\nassert first_non_repeating_character(\"ababc\") == \"c\"","source_id":"395","source_row_sha256":"56927321dcf398646ed1f58582622a783545d4e9c03f5939e4de51ebd5039e7e"},{"category":"Python","id":"mbpp-396","prompt":"Write a function to check whether the given string starts and ends with the same character or not using regex.\n\nSource prompt examples:\nassert check_char(\"abba\") == \"Valid\"\nassert check_char(\"a\") == \"Valid\"\nassert check_char(\"abcd\") == \"Invalid\"","source_id":"396","source_row_sha256":"5d59ce4c82eca25898f30ffeecd27429c593f89f1e918c7873347b3941a2de52"},{"category":"Python","id":"mbpp-397","prompt":"Write a function to find the median of three specific numbers.\n\nSource prompt examples:\nassert median_numbers(25,55,65)==55.0\nassert median_numbers(20,10,30)==20.0\nassert median_numbers(15,45,75)==45.0","source_id":"397","source_row_sha256":"7845587556a9664e617c2813f7df7a08d7395bcf8102898ede05bfa1114058f2"},{"category":"Python","id":"mbpp-398","prompt":"Write a function to compute the sum of digits of each number of a given list.\n\nSource prompt examples:\nassert sum_of_digits([10,2,56])==14\nassert sum_of_digits([[10,20,4,5,'b',70,'a']])==19\nassert sum_of_digits([10,20,-4,5,-70])==19","source_id":"398","source_row_sha256":"023de5b0ada92db6eb346a9c64d742032f9988e3140b06016a1916a083459716"},{"category":"Python","id":"mbpp-399","prompt":"Write a function to perform the mathematical bitwise xor operation across the given tuples.\n\nSource prompt examples:\nassert bitwise_xor((10, 4, 6, 9), (5, 2, 3, 3)) == (15, 6, 5, 10)\nassert bitwise_xor((11, 5, 7, 10), (6, 3, 4, 4)) == (13, 6, 3, 14)\nassert bitwise_xor((12, 6, 8, 11), (7, 4, 5, 6)) == (11, 2, 13, 13)","source_id":"399","source_row_sha256":"d4c95881d6e9c99414d3f35de79d4637444f1cf61092fdaaa6975e63184d8cf3"},{"category":"Python","id":"mbpp-40","prompt":"Write a function to find frequency of the elements in a given list of lists using collections module.\n\nSource prompt examples:\nassert freq_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]])==({2: 3, 1: 2, 5: 2, 3: 1, 4: 1, 6: 1, 7: 1, 9: 1})\nassert freq_element([[1,2,3,4],[5,6,7,8],[9,10,11,12]])==({1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1, 12: 1})\nassert freq_element([[15,20,30,40],[80,90,100,110],[30,30,80,90]])==({30: 3, 80: 2, 90: 2, 15: 1, 20: 1, 40: 1, 100: 1, 110: 1})","source_id":"40","source_row_sha256":"e7d05d4bf077e752b5f3a52c4aafacc952b186a11409bcb7a7dd6d62abf1c60b"},{"category":"Python","id":"mbpp-400","prompt":"Write a function to extract the frequency of unique tuples in the given list order irrespective.\n\nSource prompt examples:\nassert extract_freq([(3, 4), (1, 2), (4, 3), (5, 6)] ) == 3\nassert extract_freq([(4, 15), (2, 3), (5, 4), (6, 7)] ) == 4\nassert extract_freq([(5, 16), (2, 3), (6, 5), (6, 9)] ) == 4","source_id":"400","source_row_sha256":"5dfcdf86bc3152789a6a250f129e6ef25c0c1a8fe59613ead407d4d38f37fa57"},{"category":"Python","id":"mbpp-401","prompt":"Write a function to perform index wise addition of tuple elements in the given two nested tuples.\n\nSource prompt examples:\nassert add_nested_tuples(((1, 3), (4, 5), (2, 9), (1, 10)), ((6, 7), (3, 9), (1, 1), (7, 3))) == ((7, 10), (7, 14), (3, 10), (8, 13))\nassert add_nested_tuples(((2, 4), (5, 6), (3, 10), (2, 11)), ((7, 8), (4, 10), (2, 2), (8, 4))) == ((9, 12), (9, 16), (5, 12), (10, 15))\nassert add_nested_tuples(((3, 5), (6, 7), (4, 11), (3, 12)), ((8, 9), (5, 11), (3, 3), (9, 5))) == ((11, 14), (11, 18), (7, 14), (12, 17))","source_id":"401","source_row_sha256":"a4edde18ee7ae4520e8c7342369e33f3b14440d08bf6a1c8b82d4df21e26a895"},{"category":"Python","id":"mbpp-402","prompt":"Write a function to compute the value of ncr%p.\n\nSource prompt examples:\nassert ncr_modp(10,2,13)==6\nassert ncr_modp(15,12,43)==25\nassert ncr_modp(17,9,18)==10","source_id":"402","source_row_sha256":"e0a333515cc65ae3fc5163417bb810d2676701e4a3e236f4a0e1efb0f82133ab"},{"category":"Python","id":"mbpp-403","prompt":"Write a function to check if a url is valid or not using regex.\n\nSource prompt examples:\nassert is_valid_URL(\"https://www.google.com\") == True\nassert is_valid_URL(\"https:/www.gmail.com\") == False\nassert is_valid_URL(\"https:// www.redit.com\") == False","source_id":"403","source_row_sha256":"37aba411c2a8d7a39dd68bc17114746a634d42f88523cb963939f34f0927f4ab"},{"category":"Python","id":"mbpp-404","prompt":"Write a python function to find the minimum of two numbers.\n\nSource prompt examples:\nassert minimum(1,2) == 1\nassert minimum(-5,-4) == -5\nassert minimum(0,0) == 0","source_id":"404","source_row_sha256":"60aef43cf0d7478521c16bc3e6982cd27feeb917e40044799235ef6c73cc8a50"},{"category":"Python","id":"mbpp-405","prompt":"Write a function to check whether an element exists within a tuple.\n\nSource prompt examples:\nassert check_tuplex((\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"),'r')==True\nassert check_tuplex((\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\", \"e\"),'5')==False\nassert check_tuplex((\"w\", 3, \"r\", \"e\", \"s\", \"o\", \"u\", \"r\", \"c\",\"e\"),3)==True","source_id":"405","source_row_sha256":"85d19497a8f4c5185115df729dfa1e36ca63fa7d3228d2b7c481a3e4d5b19f15"},{"category":"Python","id":"mbpp-406","prompt":"Write a python function to find the parity of a given number.\n\nSource prompt examples:\nassert find_Parity(12) == \"Even Parity\"\nassert find_Parity(7) == \"Odd Parity\"\nassert find_Parity(10) == \"Even Parity\"","source_id":"406","source_row_sha256":"9585a3c1459843c9bf9fea3db23061cd1d39a002d695959dadeea624290a78a2"},{"category":"Python","id":"mbpp-407","prompt":"Write a function to create the next bigger number by rearranging the digits of a given number.\n\nSource prompt examples:\nassert rearrange_bigger(12)==21\nassert rearrange_bigger(10)==False\nassert rearrange_bigger(102)==120","source_id":"407","source_row_sha256":"c5e4962bd8e6d89c680db6c031e958a4f9311a729ed00c8ba415062af05b7d55"},{"category":"Python","id":"mbpp-408","prompt":"Write a function to find k number of pairs which consist of one element from the first array and one element from the second array.\n\nSource prompt examples:\nassert k_smallest_pairs([1,3,7],[2,4,6],2)==[[1, 2], [1, 4]]\nassert k_smallest_pairs([1,3,7],[2,4,6],1)==[[1, 2]]\nassert k_smallest_pairs([1,3,7],[2,4,6],7)==[[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [3, 6], [7, 2]]","source_id":"408","source_row_sha256":"463f55d99055784d7d74716591bd7d2d69df76368e75a58682f07347a3770695"},{"category":"Python","id":"mbpp-409","prompt":"Write a function to find the minimum product from the pairs of tuples within a given list.\n\nSource prompt examples:\nassert min_product_tuple([(2, 7), (2, 6), (1, 8), (4, 9)] )==8\nassert min_product_tuple([(10,20), (15,2), (5,10)] )==30\nassert min_product_tuple([(11,44), (10,15), (20,5), (12, 9)] )==100","source_id":"409","source_row_sha256":"8d03f98f2e19946452c3ea1e2400a59033c1dcffe41b98dbb68e1507ce655ecc"},{"category":"Python","id":"mbpp-41","prompt":"Write a function to filter even numbers using lambda function.\n\nSource prompt examples:\nassert filter_evennumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 4, 6, 8, 10]\nassert filter_evennumbers([10,20,45,67,84,93])==[10,20,84]\nassert filter_evennumbers([5,7,9,8,6,4,3])==[8,6,4]","source_id":"41","source_row_sha256":"3f6b2ec53dc94672f9c225c7e7f611c29246b4081b83720cf27964024191530c"},{"category":"Python","id":"mbpp-410","prompt":"Write a function to find the minimum value in a given heterogeneous list.\n\nSource prompt examples:\nassert min_val(['Python', 3, 2, 4, 5, 'version'])==2\nassert min_val(['Python', 15, 20, 25])==15\nassert min_val(['Python', 30, 20, 40, 50, 'version'])==20","source_id":"410","source_row_sha256":"b37d1c8631c307d4da86d4b56a4c45d9c3289471be19ee9c74ed12de286b9ad3"},{"category":"Python","id":"mbpp-411","prompt":"Write a function to convert the given snake case string to camel case string by using regex.\n\nSource prompt examples:\nassert snake_to_camel('android_tv') == 'AndroidTv'\nassert snake_to_camel('google_pixel') == 'GooglePixel'\nassert snake_to_camel('apple_watch') == 'AppleWatch'","source_id":"411","source_row_sha256":"60bf84bb6e9f8db06f61859eec386f3eb7c6cc630dcdc4bfc785a4f9b2e2f673"},{"category":"Python","id":"mbpp-412","prompt":"Write a python function to remove odd numbers from a given list.\n\nSource prompt examples:\nassert remove_odd([1,2,3]) == [2]\nassert remove_odd([2,4,6]) == [2,4,6]\nassert remove_odd([10,20,3]) == [10,20]","source_id":"412","source_row_sha256":"28354b00076cc2ffb92dd6cf767a785d1107eb2bae31169b8c0d56f74f251ac9"},{"category":"Python","id":"mbpp-413","prompt":"Write a function to extract the nth element from a given list of tuples.\n\nSource prompt examples:\nassert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,0)==['Greyson Fulton', 'Brady Kent', 'Wyatt Knott', 'Beau Turnbull']\nassert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,2)==[99, 96, 94, 98]\nassert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)],1)==[98, 97, 91, 94]","source_id":"413","source_row_sha256":"6c0a8a4d8765211602da2a5a1a103debaf6e2702aa74a6a392f2228b4ca54491"},{"category":"Python","id":"mbpp-414","prompt":"Write a python function to check whether the value exists in a sequence or not.\n\nSource prompt examples:\nassert overlapping([1,2,3,4,5],[6,7,8,9]) == False\nassert overlapping([1,2,3],[4,5,6]) == False\nassert overlapping([1,4,5],[1,4,5]) == True","source_id":"414","source_row_sha256":"375e6da60c366dee10862619ca71848bddcd0c79d681d85a777002d4a6fa38ce"},{"category":"Python","id":"mbpp-415","prompt":"Write a python function to find a pair with highest product from a given array of integers.\n\nSource prompt examples:\nassert max_Product([1,2,3,4,7,0,8,4]) == (7,8)\nassert max_Product([0,-1,-2,-4,5,0,-6]) == (-4,-6)\nassert max_Product([1,2,3]) == (2,3)","source_id":"415","source_row_sha256":"5c5babe7619908ceac2792007017fb7c237c265e41c4cc305ca4e32c8c130a47"},{"category":"Python","id":"mbpp-416","prompt":"Write a function to find the maximum sum we can make by dividing number in three parts recursively and summing them up together for the given number.\n\nSource prompt examples:\nassert breakSum(12) == 13\nassert breakSum(24) == 27\nassert breakSum(23) == 23","source_id":"416","source_row_sha256":"90389972dbd6145694e4ccac33f3e95b922b59c4629af884cd94b645a2d1cfbd"},{"category":"Python","id":"mbpp-417","prompt":"Write a function to find common first element in given list of tuple.\n\nSource prompt examples:\nassert group_tuples([('x', 'y'), ('x', 'z'), ('w', 't')]) == [('x', 'y', 'z'), ('w', 't')]\nassert group_tuples([('a', 'b'), ('a', 'c'), ('d', 'e')]) == [('a', 'b', 'c'), ('d', 'e')]\nassert group_tuples([('f', 'g'), ('f', 'g'), ('h', 'i')]) == [('f', 'g', 'g'), ('h', 'i')]","source_id":"417","source_row_sha256":"6630b67c27f74d1e2b02b5a2728d05e88242bea0ac8561357282ce7defa457e5"},{"category":"Python","id":"mbpp-418","prompt":"Write a python function to find the sublist having maximum length.\n\nSource prompt examples:\nassert Find_Max([['A'],['A','B'],['A','B','C']]) == ['A','B','C']\nassert Find_Max([[1],[1,2],[1,2,3]]) == [1,2,3]\nassert Find_Max([[1,1],[1,2,3],[1,5,6,1]]) == [1,5,6,1]","source_id":"418","source_row_sha256":"6ed2985e4011e9f948a88d7e656fec470435a355a7f97e8cb58bba3ffd8b0a18"},{"category":"Python","id":"mbpp-419","prompt":"Write a function to round every number of a given list of numbers and print the total sum multiplied by the length of the list.\n\nSource prompt examples:\nassert round_and_sum([22.4, 4.0, -16.22, -9.10, 11.00, -12.22, 14.20, -5.20, 17.50])==243\nassert round_and_sum([5,2,9,24.3,29])==345\nassert round_and_sum([25.0,56.7,89.2])==513","source_id":"419","source_row_sha256":"c9923c6e21cc3fcc17babdafee6a74e3672de4e04cf982f7acf31296eadff2c8"},{"category":"Python","id":"mbpp-42","prompt":"Write a python function to find the sum of repeated elements in a given array.\n\nSource prompt examples:\nassert find_Sum([1,2,3,1,1,4,5,6],8) == 3\nassert find_Sum([1,2,3,1,1],5) == 3\nassert find_Sum([1,1,2],3) == 2","source_id":"42","source_row_sha256":"877280f14e4eb53d53b52722249b4cca389243279e70fc3dc2126869efb19c89"},{"category":"Python","id":"mbpp-420","prompt":"Write a python function to find the cube sum of first n even natural numbers.\n\nSource prompt examples:\nassert cube_Sum(2) == 72\nassert cube_Sum(3) == 288\nassert cube_Sum(4) == 800","source_id":"420","source_row_sha256":"a89b2af65fe7e1465bf4b17c52787ddc99aa836d1fa043cbb084b30fef8f2de1"},{"category":"Python","id":"mbpp-421","prompt":"Write a function to concatenate each element of tuple by the delimiter.\n\nSource prompt examples:\nassert concatenate_tuple((\"ID\", \"is\", 4, \"UTS\") ) == 'ID-is-4-UTS'\nassert concatenate_tuple((\"QWE\", \"is\", 4, \"RTY\") ) == 'QWE-is-4-RTY'\nassert concatenate_tuple((\"ZEN\", \"is\", 4, \"OP\") ) == 'ZEN-is-4-OP'","source_id":"421","source_row_sha256":"a2053fb4956cf050493dcf8f1d0f6aeb86041394907f8459796d49354c2de355"},{"category":"Python","id":"mbpp-422","prompt":"Write a python function to find the average of cubes of first n natural numbers.\n\nSource prompt examples:\nassert find_Average_Of_Cube(2) == 4.5\nassert find_Average_Of_Cube(3) == 12\nassert find_Average_Of_Cube(1) == 1","source_id":"422","source_row_sha256":"00a922ba4a35e39b5777ed639a258ad3ff9a7f164fb08672b928fd9c6a7cd6b2"},{"category":"Python","id":"mbpp-423","prompt":"Write a function to solve gold mine problem.\n\nSource prompt examples:\nassert get_maxgold([[1, 3, 1, 5],[2, 2, 4, 1],[5, 0, 2, 3],[0, 6, 1, 2]],4,4)==16\nassert get_maxgold([[10,20],[30,40]],2,2)==70\nassert get_maxgold([[4,9],[3,7]],2,2)==13","source_id":"423","source_row_sha256":"72fdd00ef9937ef0ec0c4d8489ac5a3315b06c53d52ad3885dba731f12c07628"},{"category":"Python","id":"mbpp-424","prompt":"Write a function to extract only the rear index element of each string in the given tuple.\n\nSource prompt examples:\nassert extract_rear(('Mers', 'for', 'Vers') ) == ['s', 'r', 's']\nassert extract_rear(('Avenge', 'for', 'People') ) == ['e', 'r', 'e']\nassert extract_rear(('Gotta', 'get', 'go') ) == ['a', 't', 'o']","source_id":"424","source_row_sha256":"45b34d95c7e1c2da3151a8b3eea50c7a706d33fa2c476f18395a481c6830a5e7"},{"category":"Python","id":"mbpp-425","prompt":"Write a function to count the number of sublists containing a particular element.\n\nSource prompt examples:\nassert count_element_in_list([[1, 3], [5, 7], [1, 11], [1, 15, 7]],1)==3\nassert count_element_in_list([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']],'A')==3\nassert count_element_in_list([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']],'E')==1","source_id":"425","source_row_sha256":"92528185bd678b55e6a399d0289f2406aaf74b05d7a5fcb95db7b8cae05e6443"},{"category":"Python","id":"mbpp-426","prompt":"Write a function to filter odd numbers using lambda function.\n\nSource prompt examples:\nassert filter_oddnumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[1,3,5,7,9]\nassert filter_oddnumbers([10,20,45,67,84,93])==[45,67,93]\nassert filter_oddnumbers([5,7,9,8,6,4,3])==[5,7,9,3]","source_id":"426","source_row_sha256":"4a403866fd6f55e693ab34f541ccd0cfd6d75cd888faf81adc936f5a0a4e002b"},{"category":"Python","id":"mbpp-427","prompt":"Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format by using regex.\n\nSource prompt examples:\nassert change_date_format(\"2026-01-02\") == '02-01-2026'\nassert change_date_format(\"2020-11-13\") == '13-11-2020'\nassert change_date_format(\"2021-04-26\") == '26-04-2021'","source_id":"427","source_row_sha256":"a84af3c520334ce9640082161042e2a658dd9e7b39b6be9c0835e39ded949dbc"},{"category":"Python","id":"mbpp-428","prompt":"Write a function to sort the given array by using shell sort.\n\nSource prompt examples:\nassert shell_sort([12, 23, 4, 5, 3, 2, 12, 81, 56, 95]) == [2, 3, 4, 5, 12, 12, 23, 56, 81, 95]\nassert shell_sort([24, 22, 39, 34, 87, 73, 68]) == [22, 24, 34, 39, 68, 73, 87]\nassert shell_sort([32, 30, 16, 96, 82, 83, 74]) == [16, 30, 32, 74, 82, 83, 96]","source_id":"428","source_row_sha256":"4b7bcf61557a5848511f3cf0ab734d76153c480e448828541f9884654fc97d46"},{"category":"Python","id":"mbpp-429","prompt":"Write a function to extract the elementwise and tuples from the given two tuples.\n\nSource prompt examples:\nassert and_tuples((10, 4, 6, 9), (5, 2, 3, 3)) == (0, 0, 2, 1)\nassert and_tuples((1, 2, 3, 4), (5, 6, 7, 8)) == (1, 2, 3, 0)\nassert and_tuples((8, 9, 11, 12), (7, 13, 14, 17)) == (0, 9, 10, 0)","source_id":"429","source_row_sha256":"5de2c41c3e1a2550a25b14dc7a359fdc1d1de06dcd49cc25b6c93bd7fbefd7db"},{"category":"Python","id":"mbpp-43","prompt":"Write a function to find sequences of lowercase letters joined with an underscore using regex.\n\nSource prompt examples:\nassert text_match(\"aab_cbbbc\") == 'Found a match!'\nassert text_match(\"aab_Abbbc\") == 'Not matched!'\nassert text_match(\"Aaab_abbbc\") == 'Not matched!'","source_id":"43","source_row_sha256":"125294e7753e322628bea7a7b2124d41e38d8c5b5d11932dd45abe2ec97b3698"},{"category":"Python","id":"mbpp-430","prompt":"Write a function to find the directrix of a parabola.\n\nSource prompt examples:\nassert parabola_directrix(5,3,2)==-198\nassert parabola_directrix(9,8,4)==-2336\nassert parabola_directrix(2,4,6)==-130","source_id":"430","source_row_sha256":"dec02ee5e09fff348e37413f429f67d0f61db9a47a4f5bb82213bcc47c0b8525"},{"category":"Python","id":"mbpp-431","prompt":"Write a function that takes two lists and returns true if they have at least one common element.\n\nSource prompt examples:\nassert common_element([1,2,3,4,5], [5,6,7,8,9])==True\nassert common_element([1,2,3,4,5], [6,7,8,9])==None\nassert common_element(['a','b','c'], ['d','b','e'])==True","source_id":"431","source_row_sha256":"ca5ed886cd22dffb037dbeee9313cc3834c239e36cb287d987f694a7bdd611b6"},{"category":"Python","id":"mbpp-432","prompt":"Write a function to find the median of a trapezium.\n\nSource prompt examples:\nassert median_trapezium(15,25,35)==20\nassert median_trapezium(10,20,30)==15\nassert median_trapezium(6,9,4)==7.5","source_id":"432","source_row_sha256":"79a641e148b22e1fb95973797ee45d72b98d05d1e6f97e491783c01dfc0495d1"},{"category":"Python","id":"mbpp-433","prompt":"Write a function to check whether the entered number is greater than the elements of the given array.\n\nSource prompt examples:\nassert check_greater([1, 2, 3, 4, 5], 4) == 'No, entered number is less than those in the array'\nassert check_greater([2, 3, 4, 5, 6], 8) == 'Yes, the entered number is greater than those in the array'\nassert check_greater([9, 7, 4, 8, 6, 1], 11) == 'Yes, the entered number is greater than those in the array'","source_id":"433","source_row_sha256":"44100aa32506cce66a9ad729740dcb968326534e2f1f9bc8203c6ec823cef1d1"},{"category":"Python","id":"mbpp-434","prompt":"Write a function that matches a string that has an a followed by one or more b's.\n\nSource prompt examples:\nassert text_match_one(\"ac\")==('Not matched!')\nassert text_match_one(\"dc\")==('Not matched!')\nassert text_match_one(\"abba\")==('Found a match!')","source_id":"434","source_row_sha256":"5a9333ca2d85b703c4c68b3300c50f9e7a79bae182354bf94aab93d31ba73e41"},{"category":"Python","id":"mbpp-435","prompt":"Write a python function to find the last digit of a given number.\n\nSource prompt examples:\nassert last_Digit(123) == 3\nassert last_Digit(25) == 5\nassert last_Digit(30) == 0","source_id":"435","source_row_sha256":"a62661d09910d5cc74dc7cebd876047839f0cfcd8041d260558cf12298422959"},{"category":"Python","id":"mbpp-436","prompt":"Write a python function to print negative numbers in a list.\n\nSource prompt examples:\nassert neg_nos([-1,4,5,-6]) == -1,-6\nassert neg_nos([-1,-2,3,4]) == -1,-2\nassert neg_nos([-7,-6,8,9]) == -7,-6","source_id":"436","source_row_sha256":"65d75c6d699a26a7c03ea48299a57168d6fc4ba7ea8f067971328a04f3276172"},{"category":"Python","id":"mbpp-437","prompt":"Write a function to remove odd characters in a string.\n\nSource prompt examples:\nassert remove_odd(\"python\")==(\"yhn\")\nassert remove_odd(\"program\")==(\"rga\")\nassert remove_odd(\"language\")==(\"agae\")","source_id":"437","source_row_sha256":"2446eff4005d08b6d5a5944378172e46db199e65a20c002bb327bca5eb825d90"},{"category":"Python","id":"mbpp-438","prompt":"Write a function to count bidirectional tuple pairs.\n\nSource prompt examples:\nassert count_bidirectional([(5, 6), (1, 2), (6, 5), (9, 1), (6, 5), (2, 1)] ) == '3'\nassert count_bidirectional([(5, 6), (1, 3), (6, 5), (9, 1), (6, 5), (2, 1)] ) == '2'\nassert count_bidirectional([(5, 6), (1, 2), (6, 5), (9, 2), (6, 5), (2, 1)] ) == '4'","source_id":"438","source_row_sha256":"63420b393842ba6f1d1fb867c325a7b83b4936b1e43a2856c76f51ee83f63c7d"},{"category":"Python","id":"mbpp-439","prompt":"Write a function to convert a list of multiple integers into a single integer.\n\nSource prompt examples:\nassert multiple_to_single([11, 33, 50])==113350\nassert multiple_to_single([-1,2,3,4,5,6])==-123456\nassert multiple_to_single([10,15,20,25])==10152025","source_id":"439","source_row_sha256":"3a5ed4da1092658c6aaf4dadcd91735819e3086e0f7c3db0dccee8d70632957f"},{"category":"Python","id":"mbpp-44","prompt":"Write a function that matches a word at the beginning of a string.\n\nSource prompt examples:\nassert text_match_string(\" python\")==('Not matched!')\nassert text_match_string(\"python\")==('Found a match!')\nassert text_match_string(\"  lang\")==('Not matched!')","source_id":"44","source_row_sha256":"1e41bb33f38ed38c1d37d271f7b7fee7218f1fcfb213cd355150b19a37003049"},{"category":"Python","id":"mbpp-440","prompt":"Write a function to find all adverbs and their positions in a given sentence.\n\nSource prompt examples:\nassert find_adverb_position(\"clearly!! we can see the sky\")==(0, 7, 'clearly')\nassert find_adverb_position(\"seriously!! there are many roses\")==(0, 9, 'seriously')\nassert find_adverb_position(\"unfortunately!! sita is going to home\")==(0, 13, 'unfortunately')","source_id":"440","source_row_sha256":"a1f67065585db254b95a09d95c86e4ff27d9efc7501a2686d831c8c52df3f0bb"},{"category":"Python","id":"mbpp-441","prompt":"Write a function to find the surface area of a cube.\n\nSource prompt examples:\nassert surfacearea_cube(5)==150\nassert surfacearea_cube(3)==54\nassert surfacearea_cube(10)==600","source_id":"441","source_row_sha256":"ef030d892936da0a58a5be3ac049876745403605c255d2742303414673861cd8"},{"category":"Python","id":"mbpp-442","prompt":"Write a function to find the ration of positive numbers in an array of integers.\n\nSource prompt examples:\nassert positive_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.54\nassert positive_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.69\nassert positive_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.56","source_id":"442","source_row_sha256":"1becb1713f07d620db667d505debd2b88f4abf020d8e9302b105c29047b561cc"},{"category":"Python","id":"mbpp-443","prompt":"Write a python function to find the largest negative number from the given list.\n\nSource prompt examples:\nassert largest_neg([1,2,3,-4,-6]) == -6\nassert largest_neg([1,2,3,-8,-9]) == -9\nassert largest_neg([1,2,3,4,-1]) == -1","source_id":"443","source_row_sha256":"8827a779be4571fd063ac27b4373ce6c68e2a04f86f8276d00e51c61055c7936"},{"category":"Python","id":"mbpp-444","prompt":"Write a function to trim each tuple by k in the given tuple list.\n\nSource prompt examples:\nassert trim_tuple([(5, 3, 2, 1, 4), (3, 4, 9, 2, 1),(9, 1, 2, 3, 5), (4, 8, 2, 1, 7)], 2) == '[(2,), (9,), (2,), (2,)]'\nassert trim_tuple([(5, 3, 2, 1, 4), (3, 4, 9, 2, 1), (9, 1, 2, 3, 5), (4, 8, 2, 1, 7)], 1) == '[(3, 2, 1), (4, 9, 2), (1, 2, 3), (8, 2, 1)]'\nassert trim_tuple([(7, 8, 4, 9), (11, 8, 12, 4),(4, 1, 7, 8), (3, 6, 9, 7)], 1) == '[(8, 4), (8, 12), (1, 7), (6, 9)]'","source_id":"444","source_row_sha256":"418d1566316fc21106c0d2daa2471f8af5b307d41dc41c664acfb25b1f760fdf"},{"category":"Python","id":"mbpp-445","prompt":"Write a function to perform index wise multiplication of tuple elements in the given two tuples.\n\nSource prompt examples:\nassert index_multiplication(((1, 3), (4, 5), (2, 9), (1, 10)),((6, 7), (3, 9), (1, 1), (7, 3)) ) == ((6, 21), (12, 45), (2, 9), (7, 30))\nassert index_multiplication(((2, 4), (5, 6), (3, 10), (2, 11)),((7, 8), (4, 10), (2, 2), (8, 4)) ) == ((14, 32), (20, 60), (6, 20), (16, 44))\nassert index_multiplication(((3, 5), (6, 7), (4, 11), (3, 12)),((8, 9), (5, 11), (3, 3), (9, 5)) ) == ((24, 45), (30, 77), (12, 33), (27, 60))","source_id":"445","source_row_sha256":"442eddd469bc92bac6bbb416b78386fc0b5dfbee61a979885f757b260b98937b"},{"category":"Python","id":"mbpp-446","prompt":"Write a python function to count the occurence of all elements of list in a tuple.\n\nSource prompt examples:\nassert count_Occurrence(('a', 'a', 'c', 'b', 'd'),['a', 'b'] ) == 3\nassert count_Occurrence((1, 2, 3, 1, 4, 6, 7, 1, 4),[1, 4, 7]) == 6\nassert count_Occurrence((1,2,3,4,5,6),[1,2]) == 2","source_id":"446","source_row_sha256":"89a1e0664ca1730cab06d5246d6c28d0f8a9e0ebc96190ca98685c34164dc0ae"},{"category":"Python","id":"mbpp-447","prompt":"Write a function to find cubes of individual elements in a list using lambda function.\n\nSource prompt examples:\nassert cube_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]\nassert cube_nums([10,20,30])==([1000, 8000, 27000])\nassert cube_nums([12,15])==([1728, 3375])","source_id":"447","source_row_sha256":"6758650bd50553932e908c614542e1205587bd7abbc2efe3e198f6edf1eef423"},{"category":"Python","id":"mbpp-448","prompt":"Write a function to calculate the sum of perrin numbers.\n\nSource prompt examples:\nassert cal_sum(9) == 49\nassert cal_sum(10) == 66\nassert cal_sum(11) == 88","source_id":"448","source_row_sha256":"e76e89fb6f5fe3b3109d827b006d9271cb4cb239ff706a952daef333ab2675ca"},{"category":"Python","id":"mbpp-449","prompt":"Write a python function to check whether the triangle is valid or not if 3 points are given.\n\nSource prompt examples:\nassert check_Triangle(1,5,2,5,4,6) == 'Yes'\nassert check_Triangle(1,1,1,4,1,5) == 'No'\nassert check_Triangle(1,1,1,1,1,1) == 'No'","source_id":"449","source_row_sha256":"c37ba5ea0a4111ec00c75060590914307f1d13865d39e3c5b294478ecc0daf8c"},{"category":"Python","id":"mbpp-45","prompt":"Write a function to find the gcd of the given array elements.\n\nSource prompt examples:\nassert get_gcd([2, 4, 6, 8, 16]) == 2\nassert get_gcd([1, 2, 3]) == 1\nassert get_gcd([2, 4, 6, 8]) == 2 ","source_id":"45","source_row_sha256":"142b98c8caca136c578b019b377405970fd0881a6ea5691cb87a0338a38352a9"},{"category":"Python","id":"mbpp-450","prompt":"Write a function to extract specified size of strings from a give list of string values.\n\nSource prompt examples:\nassert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,8)==['practice', 'solution']\nassert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,6)==['Python']\nassert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,9)==['exercises']","source_id":"450","source_row_sha256":"60f5d2d5deacb26d0c284052eacbbe1f79554cf688b18b8aa77f7d0762ed6bad"},{"category":"Python","id":"mbpp-451","prompt":"Write a function to remove all whitespaces from the given string using regex.\n\nSource prompt examples:\nassert remove_whitespaces(' Google    Flutter ') == 'GoogleFlutter'\nassert remove_whitespaces(' Google    Dart ') == 'GoogleDart'\nassert remove_whitespaces(' iOS    Swift ') == 'iOSSwift'","source_id":"451","source_row_sha256":"c0214f0e954974b225f4832f48f9d22125f3835b72a00324d7ab346bfb53771b"},{"category":"Python","id":"mbpp-452","prompt":"Write a function that gives loss amount if the given amount has loss else return none.\n\nSource prompt examples:\nassert loss_amount(1500,1200)==None\nassert loss_amount(100,200)==100\nassert loss_amount(2000,5000)==3000","source_id":"452","source_row_sha256":"466a010faaabbc1efb35998d962e43416bb026f0ff4baa224d195e994f751521"},{"category":"Python","id":"mbpp-453","prompt":"Write a python function to find the sum of even factors of a number.\n\nSource prompt examples:\nassert sumofFactors(18) == 26\nassert sumofFactors(30) == 48\nassert sumofFactors(6) == 8","source_id":"453","source_row_sha256":"191ca8f4e2406deea353e8bcf9f6bddb679f71a92e473871abd662420e19161e"},{"category":"Python","id":"mbpp-454","prompt":"Write a function that matches a word containing 'z'.\n\nSource prompt examples:\nassert text_match_wordz(\"pythonz.\")==('Found a match!')\nassert text_match_wordz(\"xyz.\")==('Found a match!')\nassert text_match_wordz(\"  lang  .\")==('Not matched!')","source_id":"454","source_row_sha256":"eda5b9ba6db2bc61d1c3edcb07c3b84e7fe84c6206aa7321c33ff067c34b68af"},{"category":"Python","id":"mbpp-455","prompt":"Write a function to check whether the given month number contains 31 days or not.\n\nSource prompt examples:\nassert check_monthnumb_number(5)==True\nassert check_monthnumb_number(2)==False\nassert check_monthnumb_number(6)==False","source_id":"455","source_row_sha256":"344c8fef3f33571e3db744d492a7110f7664b50dcd06e5b36c89dc2368a26edb"},{"category":"Python","id":"mbpp-456","prompt":"Write a function to reverse strings in a given list of string values.\n\nSource prompt examples:\nassert reverse_string_list(['Red', 'Green', 'Blue', 'White', 'Black'])==['deR', 'neerG', 'eulB', 'etihW', 'kcalB']\nassert reverse_string_list(['john','amal','joel','george'])==['nhoj','lama','leoj','egroeg']\nassert reverse_string_list(['jack','john','mary'])==['kcaj','nhoj','yram']","source_id":"456","source_row_sha256":"295b37f767962cf25ba7aed818983ca9e7a6209c77c20af7ead904d53d3e3528"},{"category":"Python","id":"mbpp-457","prompt":"Write a python function to find the sublist having minimum length.\n\nSource prompt examples:\nassert Find_Min([[1],[1,2],[1,2,3]]) == [1]\nassert Find_Min([[1,1],[1,1,1],[1,2,7,8]]) == [1,1]\nassert Find_Min([['x'],['x','y'],['x','y','z']]) == ['x']","source_id":"457","source_row_sha256":"a24fe96c95dd3c6fee8ce8d8f83852bc117309362b73372139040e42ae703bb2"},{"category":"Python","id":"mbpp-458","prompt":"Write a function to find the area of a rectangle.\n\nSource prompt examples:\nassert rectangle_area(10,20)==200\nassert rectangle_area(10,5)==50\nassert rectangle_area(4,2)==8","source_id":"458","source_row_sha256":"d54c615a126c8811f60c0ecb46de64e4a9633781485bd9bb8325b5589220552d"},{"category":"Python","id":"mbpp-459","prompt":"Write a function to remove uppercase substrings from a given string by using regex.\n\nSource prompt examples:\nassert remove_uppercase('cAstyoUrFavoRitETVshoWs') == 'cstyoravoitshos'\nassert remove_uppercase('wAtchTheinTernEtrAdIo') == 'wtchheinerntrdo'\nassert remove_uppercase('VoicESeaRchAndreComMendaTionS') == 'oiceachndreomendaion'","source_id":"459","source_row_sha256":"b5c5a7d49758d5f922c3a64031f6a6623e907c1b2fa3b680b6b791df9166d3e7"},{"category":"Python","id":"mbpp-46","prompt":"Write a python function to determine whether all the numbers are different from each other are not.\n\nSource prompt examples:\nassert test_distinct([1,5,7,9]) == True\nassert test_distinct([2,4,5,5,7,9]) == False\nassert test_distinct([1,2,3]) == True","source_id":"46","source_row_sha256":"82bd922bf5bf0d3a68fe091c28b342527b064c11280d76f25585dadc1d1d4359"},{"category":"Python","id":"mbpp-460","prompt":"Write a python function to get the first element of each sublist.\n\nSource prompt examples:\nassert Extract([[1, 2], [3, 4, 5], [6, 7, 8, 9]]) == [1, 3, 6]\nassert Extract([[1,2,3],[4, 5]]) == [1,4]\nassert Extract([[9,8,1],[1,2]]) == [9,1]","source_id":"460","source_row_sha256":"167691f472a82e240b5ec393f010ceca2e7f2973113cc5835b1b61fb020e7273"},{"category":"Python","id":"mbpp-461","prompt":"Write a python function to count the upper case characters in a given string.\n\nSource prompt examples:\nassert upper_ctr('PYthon') == 1\nassert upper_ctr('BigData') == 1\nassert upper_ctr('program') == 0","source_id":"461","source_row_sha256":"5ce4bf521031996240447788b13bef9476bc31a0f6a0bca19a134b13c10326c1"},{"category":"Python","id":"mbpp-462","prompt":"Write a function to find all possible combinations of the elements of a given list.\n\nSource prompt examples:\nassert combinations_list(['orange', 'red', 'green', 'blue'])==[[], ['orange'], ['red'], ['red', 'orange'], ['green'], ['green', 'orange'], ['green', 'red'], ['green', 'red', 'orange'], ['blue'], ['blue', 'orange'], ['blue', 'red'], ['blue', 'red', 'orange'], ['blue', 'green'], ['blue', 'green', 'orange'], ['blue', 'green', 'red'], ['blue', 'green', 'red', 'orange']]\nassert combinations_list(['red', 'green', 'blue', 'white', 'black', 'orange'])==[[], ['red'], ['green'], ['green', 'red'], ['blue'], ['blue', 'red'], ['blue', 'green'], ['blue', 'green', 'red'], ['white'], ['white', 'red'], ['white', 'green'], ['white', 'green', 'red'], ['white', 'blue'], ['white', 'blue', 'red'], ['white', 'blue', 'green'], ['white', 'blue', 'green', 'red'], ['black'], ['black', 'red'], ['black', 'green'], ['black', 'green', 'red'], ['black', 'blue'], ['black', 'blue', 'red'], ['black', 'blue', 'green'], ['black', 'blue', 'green', 'red'], ['black', 'white'], ['black', 'white', 'red'], ['black', 'white', 'green'], ['black', 'white', 'green', 'red'], ['black', 'white', 'blue'], ['black', 'white', 'blue', 'red'], ['black', 'white', 'blue', 'green'], ['black', 'white', 'blue', 'green', 'red'], ['orange'], ['orange', 'red'], ['orange', 'green'], ['orange', 'green', 'red'], ['orange', 'blue'], ['orange', 'blue', 'red'], ['orange', 'blue', 'green'], ['orange', 'blue', 'green', 'red'], ['orange', 'white'], ['orange', 'white', 'red'], ['orange', 'white', 'green'], ['orange', 'white', 'green', 'red'], ['orange', 'white', 'blue'], ['orange', 'white', 'blue', 'red'], ['orange', 'white', 'blue', 'green'], ['orange', 'white', 'blue', 'green', 'red'], ['orange', 'black'], ['orange', 'black', 'red'], ['orange', 'black', 'green'], ['orange', 'black', 'green', 'red'], ['orange', 'black', 'blue'], ['orange', 'black', 'blue', 'red'], ['orange', 'black', 'blue', 'green'], ['orange', 'black', 'blue', 'green', 'red'], ['orange', 'black', 'white'], ['orange', 'black', 'white', 'red'], ['orange', 'black', 'white', 'green'], ['orange', 'black', 'white', 'green', 'red'], ['orange', 'black', 'white', 'blue'], ['orange', 'black', 'white', 'blue', 'red'], ['orange', 'black', 'white', 'blue', 'green'], ['orange', 'black', 'white', 'blue', 'green', 'red']]\nassert combinations_list(['red', 'green', 'black', 'orange'])==[[], ['red'], ['green'], ['green', 'red'], ['black'], ['black', 'red'], ['black', 'green'], ['black', 'green', 'red'], ['orange'], ['orange', 'red'], ['orange', 'green'], ['orange', 'green', 'red'], ['orange', 'black'], ['orange', 'black', 'red'], ['orange', 'black', 'green'], ['orange', 'black', 'green', 'red']]","source_id":"462","source_row_sha256":"7c6ec08ca13dca6226c7a6122bd09461bf1ebad07a91fea58cacc145a3a02fbd"},{"category":"Python","id":"mbpp-463","prompt":"Write a function to find the maximum product subarray of the given array.\n\nSource prompt examples:\nassert max_subarray_product([1, -2, -3, 0, 7, -8, -2]) == 112\nassert max_subarray_product([6, -3, -10, 0, 2]) == 180 \nassert max_subarray_product([-2, -40, 0, -2, -3]) == 80","source_id":"463","source_row_sha256":"7ef8f25ac70c98e667c4041d673f6da19b3c6abf27d45e02c9c43f637732ff20"},{"category":"Python","id":"mbpp-464","prompt":"Write a function to check if all values are same in a dictionary.\n\nSource prompt examples:\nassert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},10)==False\nassert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},12)==True\nassert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},5)==False","source_id":"464","source_row_sha256":"25622a64f32e2c17c1ff18c1293a76680f82aaaa15bbf23ceb2e37167e32ccad"},{"category":"Python","id":"mbpp-465","prompt":"Write a function to drop empty items from a given dictionary.\n\nSource prompt examples:\nassert drop_empty({'c1': 'Red', 'c2': 'Green', 'c3':None})=={'c1': 'Red', 'c2': 'Green'}\nassert drop_empty({'c1': 'Red', 'c2': None, 'c3':None})=={'c1': 'Red'}\nassert drop_empty({'c1': None, 'c2': 'Green', 'c3':None})=={ 'c2': 'Green'}","source_id":"465","source_row_sha256":"181ad2e2b303bedb996a68d710dd306432a264321641257f6ff9721865d3b6fa"},{"category":"Python","id":"mbpp-466","prompt":"Write a function to find the peak element in the given array.\n\nSource prompt examples:\nassert find_peak([1, 3, 20, 4, 1, 0], 6) == 2\nassert find_peak([2, 3, 4, 5, 6], 5) == 4\nassert find_peak([8, 9, 11, 12, 14, 15], 6) == 5 ","source_id":"466","source_row_sha256":"c6b8c9e50856b663d0b9a88f1922e8045e74b13f9489c5bf8d503789aa037413"},{"category":"Python","id":"mbpp-467","prompt":"Write a python function to convert decimal number to octal number.\n\nSource prompt examples:\nassert decimal_to_Octal(10) == 12\nassert decimal_to_Octal(2) == 2\nassert decimal_to_Octal(33) == 41","source_id":"467","source_row_sha256":"eee1188af6d4b64f9e868acd4fc9a3f44b57f357136c27fddc72e2975042d335"},{"category":"Python","id":"mbpp-468","prompt":"Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array.\n\nSource prompt examples:\nassert max_product([3, 100, 4, 5, 150, 6], 6) == 45000 \nassert max_product([4, 42, 55, 68, 80], 5) == 50265600\nassert max_product([10, 22, 9, 33, 21, 50, 41, 60], 8) == 21780000 ","source_id":"468","source_row_sha256":"f06ff9113ed29e59170ef411cd2b17c82c361b0bd8e7f57f430eace9c1ea2175"},{"category":"Python","id":"mbpp-469","prompt":"Write a function to find the maximum profit earned from a maximum of k stock transactions\n\nSource prompt examples:\nassert max_profit([1, 5, 2, 3, 7, 6, 4, 5], 3) == 10\nassert max_profit([2, 4, 7, 5, 4, 3, 5], 2) == 7\nassert max_profit([10, 6, 8, 4, 2], 2) == 2","source_id":"469","source_row_sha256":"ca7656c1d886a2819e44bf4cee9194d398baf200a8f7eb6ef0d6fc409573ce15"},{"category":"Python","id":"mbpp-47","prompt":"Write a python function to find the last digit when factorial of a divides factorial of b.\n\nSource prompt examples:\nassert compute_Last_Digit(2,4) == 2\nassert compute_Last_Digit(6,8) == 6\nassert compute_Last_Digit(1,2) == 2","source_id":"47","source_row_sha256":"a02d8659f50807724a179e76e16e7bd37c9d50c07385710e4880f8d5371cf17e"},{"category":"Python","id":"mbpp-470","prompt":"Write a function to find the pairwise addition of the elements of the given tuples.\n\nSource prompt examples:\nassert add_pairwise((1, 5, 7, 8, 10)) == (6, 12, 15, 18)\nassert add_pairwise((2, 6, 8, 9, 11)) == (8, 14, 17, 20)\nassert add_pairwise((3, 7, 9, 10, 12)) == (10, 16, 19, 22)","source_id":"470","source_row_sha256":"24874699adf55d6ab8a0145ac541dba298188e510506821af4bff11400e2fb38"},{"category":"Python","id":"mbpp-471","prompt":"Write a python function to find remainder of array multiplication divided by n.\n\nSource prompt examples:\nassert find_remainder([ 100, 10, 5, 25, 35, 14 ],6,11) ==9\nassert find_remainder([1,1,1],3,1) == 0\nassert find_remainder([1,2,1],3,2) == 0","source_id":"471","source_row_sha256":"bf3a711f71e5047803ba082ca5ed1b6e09e98e3f35e464084f942dc2803614c9"},{"category":"Python","id":"mbpp-472","prompt":"Write a python function to check whether the given list contains consecutive numbers or not.\n\nSource prompt examples:\nassert check_Consecutive([1,2,3,4,5]) == True\nassert check_Consecutive([1,2,3,5,6]) == False\nassert check_Consecutive([1,2,1]) == False","source_id":"472","source_row_sha256":"be16914f79071ec8dd554f435338cadf0b68b645152449099140531e8ef326c0"},{"category":"Python","id":"mbpp-473","prompt":"Write a function to find the tuple intersection of elements in the given tuple list irrespective of their order.\n\nSource prompt examples:\nassert tuple_intersection([(3, 4), (5, 6), (9, 10), (4, 5)] , [(5, 4), (3, 4), (6, 5), (9, 11)]) == {(4, 5), (3, 4), (5, 6)}\nassert tuple_intersection([(4, 1), (7, 4), (11, 13), (17, 14)] , [(1, 4), (7, 4), (16, 12), (10, 13)]) == {(4, 7), (1, 4)}\nassert tuple_intersection([(2, 1), (3, 2), (1, 3), (1, 4)] , [(11, 2), (2, 3), (6, 2), (1, 3)]) == {(1, 3), (2, 3)}","source_id":"473","source_row_sha256":"4db14f0cb9246bde2ae0cebde42596d4e7d1455a5c33330d88e85a8f2e333d0a"},{"category":"Python","id":"mbpp-474","prompt":"Write a function to replace characters in a string.\n\nSource prompt examples:\nassert replace_char(\"polygon\",'y','l')==(\"pollgon\")\nassert replace_char(\"character\",'c','a')==(\"aharaater\")\nassert replace_char(\"python\",'l','a')==(\"python\")","source_id":"474","source_row_sha256":"f3537be53421bfe9eb6ba637d909d8b01351090e3edc8048e0f5e1012112f141"},{"category":"Python","id":"mbpp-475","prompt":"Write a function to sort counter by value.\n\nSource prompt examples:\nassert sort_counter({'Math':81, 'Physics':83, 'Chemistry':87})==[('Chemistry', 87), ('Physics', 83), ('Math', 81)]\nassert sort_counter({'Math':400, 'Physics':300, 'Chemistry':250})==[('Math', 400), ('Physics', 300), ('Chemistry', 250)]\nassert sort_counter({'Math':900, 'Physics':1000, 'Chemistry':1250})==[('Chemistry', 1250), ('Physics', 1000), ('Math', 900)]","source_id":"475","source_row_sha256":"75885ae1c37a6fde75130b4d7dc7878ad73374c631b591ba079ba8774df6b6ad"},{"category":"Python","id":"mbpp-476","prompt":"Write a python function to find the sum of the largest and smallest value in a given array.\n\nSource prompt examples:\nassert big_sum([1,2,3]) == 4\nassert big_sum([-1,2,3,4]) == 3\nassert big_sum([2,3,6]) == 8","source_id":"476","source_row_sha256":"540dfde29a0034f89704d519a4b20d8f8ba261238c56aaca01e01a50d562557c"},{"category":"Python","id":"mbpp-477","prompt":"Write a python function to convert the given string to lower case.\n\nSource prompt examples:\nassert is_lower(\"InValid\") == \"invalid\"\nassert is_lower(\"TruE\") == \"true\"\nassert is_lower(\"SenTenCE\") == \"sentence\"","source_id":"477","source_row_sha256":"73e98859a3b448b2c7b813833199aa3f7de440a856b7985337dc0852f04cef6e"},{"category":"Python","id":"mbpp-478","prompt":"Write a function to remove lowercase substrings from a given string.\n\nSource prompt examples:\nassert remove_lowercase(\"PYTHon\")==('PYTH')\nassert remove_lowercase(\"FInD\")==('FID')\nassert remove_lowercase(\"STRinG\")==('STRG')","source_id":"478","source_row_sha256":"80352848009f822dfb7cd6efd54df8c41ae8c556a32772a61059e875fb20359e"},{"category":"Python","id":"mbpp-479","prompt":"Write a python function to find the first digit of a given number.\n\nSource prompt examples:\nassert first_Digit(123) == 1\nassert first_Digit(456) == 4\nassert first_Digit(12) == 1","source_id":"479","source_row_sha256":"611a0789e87efccb30fc981821dabb62e86bb1efb3013976139652870c9e35db"},{"category":"Python","id":"mbpp-48","prompt":"Write a python function to set all odd bits of a given number.\n\nSource prompt examples:\nassert odd_bit_set_number(10) == 15\nassert odd_bit_set_number(20) == 21\nassert odd_bit_set_number(30) == 31","source_id":"48","source_row_sha256":"98dc2772ca4aeafdd49bd688f64cd78142c10b44392706985273e2ab744db056"},{"category":"Python","id":"mbpp-480","prompt":"Write a python function to find the maximum occurring character in a given string.\n\nSource prompt examples:\nassert get_max_occuring_char(\"data\") == \"a\"\nassert get_max_occuring_char(\"create\") == \"e\"\nassert get_max_occuring_char(\"brilliant girl\") == \"i\"","source_id":"480","source_row_sha256":"688beb0a255503950f83cfdebb1f04dfb04e2cd80947a50f6404694655bf29a7"},{"category":"Python","id":"mbpp-481","prompt":"Write a function to determine if there is a subset of the given set with sum equal to the given sum.\n\nSource prompt examples:\nassert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 9) == True\nassert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 30) == False\nassert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 15) == True","source_id":"481","source_row_sha256":"cee5310ad3c9e9422ad4a7099058fbc65dc8c2d07e4a5115c5ab84e6d676a53d"},{"category":"Python","id":"mbpp-482","prompt":"Write a function to find sequences of one upper case letter followed by lower case letters in the given string by using regex.\n\nSource prompt examples:\nassert match(\"Geeks\") == 'Yes'\nassert match(\"geeksforGeeks\") == 'Yes'\nassert match(\"geeks\") == 'No'","source_id":"482","source_row_sha256":"3824386f6e8facf1d3fd7a95a9b6ee1e331a41dc0b959cd1c3212bae03927695"},{"category":"Python","id":"mbpp-483","prompt":"Write a python function to find the first natural number whose factorial is divisible by x.\n\nSource prompt examples:\nassert first_Factorial_Divisible_Number(10) == 5\nassert first_Factorial_Divisible_Number(15) == 5\nassert first_Factorial_Divisible_Number(5) == 4","source_id":"483","source_row_sha256":"2186a4c38bd9d9ec89f1b7dbde18936c0c4a396ec82ee71c7f73e3e1c9558c3c"},{"category":"Python","id":"mbpp-484","prompt":"Write a function to remove the matching tuples from the given two tuples.\n\nSource prompt examples:\nassert remove_matching_tuple([('Hello', 'dude'), ('How', 'are'), ('you', '?')], [('Hello', 'dude'), ('How', 'are')]) == [('you', '?')]\nassert remove_matching_tuple([('Part', 'of'), ('the', 'journey'), ('is ', 'end')], [('Journey', 'the'), ('is', 'end')]) == [('Part', 'of'), ('the', 'journey'), ('is ', 'end')]\nassert remove_matching_tuple([('Its', 'been'), ('a', 'long'), ('day', 'without')], [('a', 'long'), ('my', 'friend')]) == [('Its', 'been'), ('day', 'without')]","source_id":"484","source_row_sha256":"297ed0e0473cea6ece6aeb0255bfca752ad6fa6746548369d59db9de896ca8f9"},{"category":"Python","id":"mbpp-485","prompt":"Write a function to find the largest palindromic number in the given array.\n\nSource prompt examples:\nassert largest_palindrome([1, 232, 54545, 999991], 4) == 54545\nassert largest_palindrome([1, 2, 3, 4, 5, 50], 6) == 5\nassert largest_palindrome([1, 3, 7, 9, 45], 5)  == 9","source_id":"485","source_row_sha256":"2ffd4f221fc778ca14436c71f5b7b0ebc62bd0fc5b1f2520a232edf53f79e3f6"},{"category":"Python","id":"mbpp-486","prompt":"Write a function to compute binomial probability for the given number.\n\nSource prompt examples:\nassert binomial_probability(10, 5, 1.0/3) == 0.13656454808718185\nassert binomial_probability(11, 6, 2.0/4) == 0.2255859375\nassert binomial_probability(12, 7, 3.0/5) == 0.227030335488","source_id":"486","source_row_sha256":"4cc3c968606c8681211ef95da8d8e81c01001d01dc140a8ede2fa54c6e413e4d"},{"category":"Python","id":"mbpp-487","prompt":"Write a function to sort a list of tuples in increasing order by the last element in each tuple.\n\nSource prompt examples:\nassert sort_tuple([(1, 3), (3, 2), (2, 1)] ) == [(2, 1), (3, 2), (1, 3)]\nassert sort_tuple([(2, 4), (3, 3), (1, 1)] ) == [(1, 1), (3, 3), (2, 4)]\nassert sort_tuple([(3, 9), (6, 7), (4, 3)] ) == [(4, 3), (6, 7), (3, 9)]","source_id":"487","source_row_sha256":"d6f02a5de4cd3d622fb2818c1e65ea993632a977a393231830068db6c0f4e186"},{"category":"Python","id":"mbpp-488","prompt":"Write a function to find the area of a pentagon.\n\nSource prompt examples:\nassert area_pentagon(5)==43.01193501472417\nassert area_pentagon(10)==172.0477400588967\nassert area_pentagon(15)==387.10741513251753","source_id":"488","source_row_sha256":"83ce4d84ad0f9ce9300515813387e47b7626ff1035964b01c80ae953fcf50879"},{"category":"Python","id":"mbpp-489","prompt":"Write a python function to find the frequency of the largest value in a given array.\n\nSource prompt examples:\nassert frequency_Of_Largest(5,[1,2,3,4,4]) == 2\nassert frequency_Of_Largest(3,[5,6,5]) == 1\nassert frequency_Of_Largest(4,[2,7,7,7]) == 3","source_id":"489","source_row_sha256":"894b738682a2929013faed23469af211e6f83149cb09470e50a7af19b8f50e93"},{"category":"Python","id":"mbpp-49","prompt":"Write a function to extract every first or specified element from a given two-dimensional list.\n\nSource prompt examples:\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],0)==[1, 4, 7]\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],2)==[3, 6, 9]\nassert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],1)==[2,5,1]","source_id":"49","source_row_sha256":"cc3f6d35fb2eb0f7ad5c49e11c3f5322f1ef64079d61b590b9f9a6df99db466d"},{"category":"Python","id":"mbpp-490","prompt":"Write a function to extract all the pairs which are symmetric in the given tuple list.\n\nSource prompt examples:\nassert extract_symmetric([(6, 7), (2, 3), (7, 6), (9, 8), (10, 2), (8, 9)] ) == {(8, 9), (6, 7)}\nassert extract_symmetric([(7, 8), (3, 4), (8, 7), (10, 9), (11, 3), (9, 10)] ) == {(9, 10), (7, 8)}\nassert extract_symmetric([(8, 9), (4, 5), (9, 8), (11, 10), (12, 4), (10, 11)] ) == {(8, 9), (10, 11)}","source_id":"490","source_row_sha256":"7f76e0b4b77f54de7fb19d6b7dfbad35204b34fa09fbe6d2af1718706d61a60e"},{"category":"Python","id":"mbpp-491","prompt":"Write a function to find the sum of geometric progression series.\n\nSource prompt examples:\nassert sum_gp(1,5,2)==31\nassert sum_gp(1,5,4)==341\nassert sum_gp(2,6,3)==728","source_id":"491","source_row_sha256":"5a65a080dcdb89aab534de7a5946418d975ef856e29db86a4eacf58df7d98557"},{"category":"Python","id":"mbpp-492","prompt":"Write a function to search an element in the given array by using binary search.\n\nSource prompt examples:\nassert binary_search([1,2,3,5,8], 6) == False\nassert binary_search([7, 8, 9, 10, 13], 10) == True\nassert binary_search([11, 13, 14, 19, 22, 36], 23) == False","source_id":"492","source_row_sha256":"5d4afc40c4e0f05e083376c1cd5040ae8fe18bc0cab5988ad6780b91831884be"},{"category":"Python","id":"mbpp-493","prompt":"Write a function to calculate a grid of hexagon coordinates where function returns a list of lists containing 6 tuples of x, y point coordinates.\n\nSource prompt examples:\nassert calculate_polygons(1,1, 4, 4, 3)==[[(-5.0, -4.196152422706632), (-5.0, -0.7320508075688767), (-2.0, 1.0), (1.0, -0.7320508075688767), (1.0, -4.196152422706632), (-2.0, -5.928203230275509), (-5.0, -4.196152422706632)], [(1.0, -4.196152422706632), (1.0, -0.7320508075688767), (4.0, 1.0), (7.0, -0.7320508075688767), (7.0, -4.196152422706632), (4.0, -5.928203230275509), (1.0, -4.196152422706632)], [(7.0, -4.196152422706632), (7.0, -0.7320508075688767), (10.0, 1.0), (13.0, -0.7320508075688767), (13.0, -4.196152422706632), (10.0, -5.928203230275509), (7.0, -4.196152422706632)], [(-2.0, 1.0000000000000004), (-2.0, 4.464101615137755), (1.0, 6.196152422706632), (4.0, 4.464101615137755), (4.0, 1.0000000000000004), (1.0, -0.7320508075688767), (-2.0, 1.0000000000000004)], [(4.0, 1.0000000000000004), (4.0, 4.464101615137755), (7.0, 6.196152422706632), (10.0, 4.464101615137755), (10.0, 1.0000000000000004), (7.0, -0.7320508075688767), (4.0, 1.0000000000000004)], [(-5.0, 6.196152422706632), (-5.0, 9.660254037844387), (-2.0, 11.392304845413264), (1.0, 9.660254037844387), (1.0, 6.196152422706632), (-2.0, 4.464101615137755), (-5.0, 6.196152422706632)], [(1.0, 6.196152422706632), (1.0, 9.660254037844387), (4.0, 11.392304845413264), (7.0, 9.660254037844387), (7.0, 6.196152422706632), (4.0, 4.464101615137755), (1.0, 6.196152422706632)], [(7.0, 6.196152422706632), (7.0, 9.660254037844387), (10.0, 11.392304845413264), (13.0, 9.660254037844387), (13.0, 6.196152422706632), (10.0, 4.464101615137755), (7.0, 6.196152422706632)], [(-2.0, 11.392304845413264), (-2.0, 14.85640646055102), (1.0, 16.588457268119896), (4.0, 14.85640646055102), (4.0, 11.392304845413264), (1.0, 9.660254037844387), (-2.0, 11.392304845413264)], [(4.0, 11.392304845413264), (4.0, 14.85640646055102), (7.0, 16.588457268119896), (10.0, 14.85640646055102), (10.0, 11.392304845413264), (7.0, 9.660254037844387), (4.0, 11.392304845413264)]]\nassert calculate_polygons(5,4,7,9,8)==[[(-11.0, -9.856406460551018), (-11.0, -0.6188021535170058), (-3.0, 4.0), (5.0, -0.6188021535170058), (5.0, -9.856406460551018), (-3.0, -14.475208614068023), (-11.0, -9.856406460551018)], [(5.0, -9.856406460551018), (5.0, -0.6188021535170058), (13.0, 4.0), (21.0, -0.6188021535170058), (21.0, -9.856406460551018), (13.0, -14.475208614068023), (5.0, -9.856406460551018)], [(21.0, -9.856406460551018), (21.0, -0.6188021535170058), (29.0, 4.0), (37.0, -0.6188021535170058), (37.0, -9.856406460551018), (29.0, -14.475208614068023), (21.0, -9.856406460551018)], [(-3.0, 4.0), (-3.0, 13.237604307034012), (5.0, 17.856406460551018), (13.0, 13.237604307034012), (13.0, 4.0), (5.0, -0.6188021535170058), (-3.0, 4.0)], [(13.0, 4.0), (13.0, 13.237604307034012), (21.0, 17.856406460551018), (29.0, 13.237604307034012), (29.0, 4.0), (21.0, -0.6188021535170058), (13.0, 4.0)], [(-11.0, 17.856406460551018), (-11.0, 27.09401076758503), (-3.0, 31.712812921102035), (5.0, 27.09401076758503), (5.0, 17.856406460551018), (-3.0, 13.237604307034012), (-11.0, 17.856406460551018)], [(5.0, 17.856406460551018), (5.0, 27.09401076758503), (13.0, 31.712812921102035), (21.0, 27.09401076758503), (21.0, 17.856406460551018), (13.0, 13.237604307034012), (5.0, 17.856406460551018)], [(21.0, 17.856406460551018), (21.0, 27.09401076758503), (29.0, 31.712812921102035), (37.0, 27.09401076758503), (37.0, 17.856406460551018), (29.0, 13.237604307034012), (21.0, 17.856406460551018)], [(-3.0, 31.712812921102035), (-3.0, 40.95041722813605), (5.0, 45.569219381653056), (13.0, 40.95041722813605), (13.0, 31.712812921102035), (5.0, 27.09401076758503), (-3.0, 31.712812921102035)], [(13.0, 31.712812921102035), (13.0, 40.95041722813605), (21.0, 45.569219381653056), (29.0, 40.95041722813605), (29.0, 31.712812921102035), (21.0, 27.09401076758503), (13.0, 31.712812921102035)]]\nassert calculate_polygons(9,6,4,3,2)==[[(5.0, 2.5358983848622456), (5.0, 4.8452994616207485), (7.0, 6.0), (9.0, 4.8452994616207485), (9.0, 2.5358983848622456), (7.0, 1.3811978464829942), (5.0, 2.5358983848622456)], [(7.0, 6.0), (7.0, 8.309401076758503), (9.0, 9.464101615137753), (11.0, 8.309401076758503), (11.0, 6.0), (9.0, 4.8452994616207485), (7.0, 6.0)]]","source_id":"493","source_row_sha256":"5554fe753a60c63464fc1b1b5147f9aba16b0e936007ec3f609ef3162f0b9646"},{"category":"Python","id":"mbpp-494","prompt":"Write a function to convert the given binary tuple to integer.\n\nSource prompt examples:\nassert binary_to_integer((1, 1, 0, 1, 0, 0, 1)) == '105'\nassert binary_to_integer((0, 1, 1, 0, 0, 1, 0, 1)) == '101'\nassert binary_to_integer((1, 1, 0, 1, 0, 1)) == '53'","source_id":"494","source_row_sha256":"c9decb8940d0bfaedf5661028bcc428ba048a30e4321b0ef99fcfded7aa148fb"},{"category":"Python","id":"mbpp-495","prompt":"Write a function to remove lowercase substrings from a given string by using regex.\n\nSource prompt examples:\nassert remove_lowercase('KDeoALOklOOHserfLoAJSIskdsf') == 'KDALOOOHLAJSI'\nassert remove_lowercase('ProducTnamEstreAmIngMediAplAYer') == 'PTEAIMAAY'\nassert remove_lowercase('maNufacTuredbYSheZenTechNolOGIes') == 'NTYSZTNOGI'","source_id":"495","source_row_sha256":"7bccf9b15476fb7a2827fc08c57bfe2857cb882ecd150e751b358dfad1011bef"},{"category":"Python","id":"mbpp-496","prompt":"Write a function to find the smallest integers from a given list of numbers using heap queue algorithm.\n\nSource prompt examples:\nassert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 25, 58],3)==[14, 22, 25] \nassert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 25, 58],2)==[14, 22]\nassert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 22, 58],5)==[14, 22, 22, 25, 35]","source_id":"496","source_row_sha256":"e44f6c25ba07dadbbf5de67b4554586e8d837ce2f8043881c18915b0b286ea19"},{"category":"Python","id":"mbpp-497","prompt":"Write a function to find the surface area of a cone.\n\nSource prompt examples:\nassert surfacearea_cone(5,12)==282.7433388230814\nassert surfacearea_cone(10,15)==880.5179353159282\nassert surfacearea_cone(19,17)==2655.923961165254","source_id":"497","source_row_sha256":"45cdda6e930f0a1fe73d1926845a827fb29b56f362b875c0156f0e5cc817b34f"},{"category":"Python","id":"mbpp-498","prompt":"Write a python function to find gcd of two positive integers.\n\nSource prompt examples:\nassert gcd(12, 17) == 1\nassert gcd(4,6) == 2\nassert gcd(2,9) == 1","source_id":"498","source_row_sha256":"4f56e6240becd5fa40688c5517565afc6c40e33a5ad56a917efcb007dfa4cfb3"},{"category":"Python","id":"mbpp-499","prompt":"Write a function to find the diameter of a circle.\n\nSource prompt examples:\nassert diameter_circle(10)==20\nassert diameter_circle(40)==80\nassert diameter_circle(15)==30","source_id":"499","source_row_sha256":"207d03af219ff610fc581e94d11f988f7b0ed11b585fe7b4ffd1f574bed62762"},{"category":"Python","id":"mbpp-50","prompt":"Write a function to find the list with minimum length using lambda function.\n\nSource prompt examples:\nassert min_length_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(1, [0])\nassert min_length_list([[1,2,3,4,5],[1,2,3,4],[1,2,3],[1,2],[1]])==(1,[1])\nassert min_length_list([[3,4,5],[6,7,8,9],[10,11,12],[1,2]])==(2,[1,2])","source_id":"50","source_row_sha256":"abc2c32893e687b247931e06eb7c5f5ab0da93c719db1eb426323ac18be0ad2a"},{"category":"Python","id":"mbpp-500","prompt":"Write a function to concatenate all elements of the given list into a string.\n\nSource prompt examples:\nassert concatenate_elements(['hello','there','have','a','rocky','day'] ) == '  hello there have a rocky day'\nassert concatenate_elements([ 'Hi', 'there', 'How','are', 'you'] ) == '  Hi there How are you'\nassert concatenate_elements([ 'Part', 'of', 'the','journey', 'is', 'end'] ) == '  Part of the journey is end'","source_id":"500","source_row_sha256":"8d3ea7b6359d2e6afedcaf1539ead13be3375297cc62387ef75bd387003b0395"},{"category":"Python","id":"mbpp-501","prompt":"Write a python function to find common divisor between two numbers in a given pair.\n\nSource prompt examples:\nassert num_comm_div(2,4) == 2\nassert num_comm_div(2,8) == 2\nassert num_comm_div(12,24) == 6","source_id":"501","source_row_sha256":"423f84ed596fe5f98968e14194ac7bc2f770a17f907e58c7613fefcbc3f5de17"},{"category":"Python","id":"mbpp-502","prompt":"Write a python function to find remainder of two numbers.\n\nSource prompt examples:\nassert find(3,3) == 0\nassert find(10,3) == 1\nassert find(16,5) == 1","source_id":"502","source_row_sha256":"b4086ca3f8a08c15a743d33c5e66e699db828ed8e179b09b7f85fdc4d79eb3eb"},{"category":"Python","id":"mbpp-503","prompt":"Write a function to add consecutive numbers of a given list.\n\nSource prompt examples:\nassert add_consecutive_nums([1, 1, 3, 4, 4, 5, 6, 7])==[2, 4, 7, 8, 9, 11, 13]\nassert add_consecutive_nums([4, 5, 8, 9, 6, 10])==[9, 13, 17, 15, 16]\nassert add_consecutive_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[3, 5, 7, 9, 11, 13, 15, 17, 19]","source_id":"503","source_row_sha256":"332a55d7463acac50579f5a2f089cd57237c09c901c5709cacabae0910070d9a"},{"category":"Python","id":"mbpp-504","prompt":"Write a python function to find the cube sum of first n natural numbers.\n\nSource prompt examples:\nassert sum_Of_Series(5) == 225\nassert sum_Of_Series(2) == 9\nassert sum_Of_Series(3) == 36","source_id":"504","source_row_sha256":"1c93e01031cf7fbe22a18c6090a6f24c5a70669bbf1fe0cbdb5a84c51a10ae10"},{"category":"Python","id":"mbpp-505","prompt":"Write a function to move all zeroes to the end of the given array.\n\nSource prompt examples:\nassert re_order([6, 0, 8, 2, 3, 0, 4, 0, 1]) == [6, 8, 2, 3, 4, 1, 0, 0, 0]\nassert re_order([4, 0, 2, 7, 0, 9, 0, 12, 0]) == [4, 2, 7, 9, 12, 0, 0, 0, 0]\nassert re_order([3, 11, 0, 74, 14, 0, 1, 0, 2]) == [3, 11, 74, 14, 1, 2, 0, 0, 0]","source_id":"505","source_row_sha256":"00925e56bae127f89eea9e48d803639dc5035b9bbbbe74ddea32bc33377b2af9"},{"category":"Python","id":"mbpp-506","prompt":"Write a function to calculate the permutation coefficient of given p(n, k).\n\nSource prompt examples:\nassert permutation_coefficient(10, 2) == 90\nassert permutation_coefficient(10, 3) == 720\nassert permutation_coefficient(10, 1) == 10","source_id":"506","source_row_sha256":"b9f97805010b4eeca1c2ae91ef1f79223beb50d59be3627918af8ff2c65eba39"},{"category":"Python","id":"mbpp-507","prompt":"Write a function to remove specific words from a given list.\n\nSource prompt examples:\nassert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['white', 'orange'])==['red', 'green', 'blue', 'black']\nassert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['black', 'orange'])==['red', 'green', 'blue', 'white']\nassert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['blue', 'white'])==['red', 'green', 'black', 'orange']","source_id":"507","source_row_sha256":"bd5ca3e4c9d5e7f85a2a7142ad3438d9b5d17c11cd79f9b32cb522aa8b7c86b7"},{"category":"Python","id":"mbpp-508","prompt":"Write a function to check if the common elements between two given lists are in the same order or not.\n\nSource prompt examples:\nassert same_order([\"red\",\"green\",\"black\",\"orange\"],[\"red\",\"pink\",\"green\",\"white\",\"black\"])==True\nassert same_order([\"red\",\"pink\",\"green\",\"white\",\"black\"],[\"white\",\"orange\",\"pink\",\"black\"])==False\nassert same_order([\"red\",\"green\",\"black\",\"orange\"],[\"red\",\"pink\",\"green\",\"white\",\"black\"])==True","source_id":"508","source_row_sha256":"5f9983eedb2b8bc75fb25305c67bf43ef1ed3e99444c56814c5a13281550e8ef"},{"category":"Python","id":"mbpp-509","prompt":"Write a python function to find the average of odd numbers till a given odd number.\n\nSource prompt examples:\nassert average_Odd(9) == 5\nassert average_Odd(5) == 3\nassert average_Odd(11) == 6","source_id":"509","source_row_sha256":"008de8512b31d4e0f4d73fdfcfc34e7c2462775ed09878adfef5fa19374b2bcb"},{"category":"Python","id":"mbpp-51","prompt":"Write a function to print check if the triangle is equilateral or not.\n\nSource prompt examples:\nassert check_equilateral(6,8,12)==False \nassert check_equilateral(6,6,12)==False\nassert check_equilateral(6,6,6)==True","source_id":"51","source_row_sha256":"b8255f22eba9448e0f1128d867e25259109f68deba57a8be76858c5c8dcb9286"},{"category":"Python","id":"mbpp-510","prompt":"Write a function to find the number of subsequences having product smaller than k for the given non negative array.\n\nSource prompt examples:\nassert no_of_subsequences([1,2,3,4], 10) == 11\nassert no_of_subsequences([4,8,7,2], 50) == 9\nassert no_of_subsequences([5,6,7,8], 15) == 4","source_id":"510","source_row_sha256":"5f579b2c01d83fee814478d070bc5271b283b2dfcb0da0262ca2a532584c2836"},{"category":"Python","id":"mbpp-52","prompt":"Write a function to caluclate area of a parallelogram.\n\nSource prompt examples:\nassert parallelogram_area(10,20)==200\nassert parallelogram_area(15,20)==300\nassert parallelogram_area(8,9)==72","source_id":"52","source_row_sha256":"82346ae148b0b5e51b17ab3adb951074b548e98b2712c4319d4ff805b69b2a8c"},{"category":"Python","id":"mbpp-53","prompt":"Write a python function to check whether the first and last characters of a given string are equal or not.\n\nSource prompt examples:\nassert check_Equality(\"abcda\") == \"Equal\"\nassert check_Equality(\"ab\") == \"Not Equal\"\nassert check_Equality(\"mad\") == \"Not Equal\"","source_id":"53","source_row_sha256":"cd32afe979e4f50be831839b2d65a34d4f259eccee20f3d3fa27c35ce4f07a4d"},{"category":"Python","id":"mbpp-54","prompt":"Write a function to sort the given array by using counting sort.\n\nSource prompt examples:\nassert counting_sort([1,23,4,5,6,7,8]) == [1, 4, 5, 6, 7, 8, 23]\nassert counting_sort([12, 9, 28, 33, 69, 45]) == [9, 12, 28, 33, 45, 69]\nassert counting_sort([8, 4, 14, 3, 2, 1]) == [1, 2, 3, 4, 8, 14]","source_id":"54","source_row_sha256":"003883200d6a5cb6f428a7833104954b096a656d12e5d600ece93b302c69f131"},{"category":"Python","id":"mbpp-55","prompt":"Write a function to find t-nth term of geometric series.\n\nSource prompt examples:\nassert tn_gp(1,5,2)==16\nassert tn_gp(1,5,4)==256\nassert tn_gp(2,6,3)==486","source_id":"55","source_row_sha256":"b43a93b575c23defe75f7d5f2ffb0de9f066dfe4f7c4715c914ab646a8a926e3"},{"category":"Python","id":"mbpp-56","prompt":"Write a python function to check if a given number is one less than twice its reverse.\n\nSource prompt examples:\nassert check(70) == False\nassert check(23) == False\nassert check(73) == True","source_id":"56","source_row_sha256":"4aa698c32bb04816186eb47cc3533ea75ac595c9db889e625fd77c720311aef7"},{"category":"Python","id":"mbpp-57","prompt":"Write a python function to find the largest number that can be formed with the given digits.\n\nSource prompt examples:\nassert find_Max_Num([1,2,3],3) == 321\nassert find_Max_Num([4,5,6,1],4) == 6541\nassert find_Max_Num([1,2,3,9],4) == 9321","source_id":"57","source_row_sha256":"163eb6cbb8eb0f66b5c195430e21102c69616a84d1280f9491ef63f05098bdc6"},{"category":"Python","id":"mbpp-58","prompt":"Write a python function to check whether the given two integers have opposite sign or not.\n\nSource prompt examples:\nassert opposite_Signs(1,-2) == True\nassert opposite_Signs(3,2) == False\nassert opposite_Signs(-10,-10) == False","source_id":"58","source_row_sha256":"6f55f8b3d5c6215e146f38d8891b8892586234113591e8d866168cb367500ba4"},{"category":"Python","id":"mbpp-59","prompt":"Write a function to find the nth octagonal number.\n\nSource prompt examples:\nassert is_octagonal(5) == 65\nassert is_octagonal(10) == 280\nassert is_octagonal(15) == 645","source_id":"59","source_row_sha256":"e38e45fd819bfbea10d044cf44c5e41d6e32c2dd1ac94e72a553670a80cef91f"},{"category":"Python","id":"mbpp-60","prompt":"Write a function to find the maximum length of the subsequence with difference between adjacent elements for the given array.\n\nSource prompt examples:\nassert max_len_sub([2, 5, 6, 3, 7, 6, 5, 8], 8) == 5\nassert max_len_sub([-2, -1, 5, -1, 4, 0, 3], 7) == 4\nassert max_len_sub([9, 11, 13, 15, 18], 5) == 1","source_id":"60","source_row_sha256":"1f48f74cdfef4dc1364dcf7e9ff14864d02ce04ed8e26228c6021aa402f758b6"},{"category":"Python","id":"mbpp-61","prompt":"Write a python function to count number of substrings with the sum of digits equal to their length.\n\nSource prompt examples:\nassert count_Substrings('112112',6) == 6\nassert count_Substrings('111',3) == 6\nassert count_Substrings('1101112',7) == 12","source_id":"61","source_row_sha256":"427491bb0300a3db77d460417309c524c54eda1ae8d724f01e9064459d7d43ae"},{"category":"Python","id":"mbpp-62","prompt":"Write a python function to find smallest number in a list.\n\nSource prompt examples:\nassert smallest_num([10, 20, 1, 45, 99]) == 1\nassert smallest_num([1, 2, 3]) == 1\nassert smallest_num([45, 46, 50, 60]) == 45","source_id":"62","source_row_sha256":"86e84db560a6f6ea38fad389d80f73a073f9521bb876fbae6c7d2ec4bb45755d"},{"category":"Python","id":"mbpp-63","prompt":"Write a function to find the maximum difference between available pairs in the given tuple list.\n\nSource prompt examples:\nassert max_difference([(3, 5), (1, 7), (10, 3), (1, 2)]) == 7\nassert max_difference([(4, 6), (2, 17), (9, 13), (11, 12)]) == 15\nassert max_difference([(12, 35), (21, 27), (13, 23), (41, 22)]) == 23","source_id":"63","source_row_sha256":"fedd3b96956ba3f33460bb2675fdce569629f855f114a8ab26349d2fa270ef2b"},{"category":"Python","id":"mbpp-64","prompt":"Write a function to sort a list of tuples using lambda.\n\nSource prompt examples:\nassert subject_marks([('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)])==[('Social sciences', 82), ('English', 88), ('Science', 90), ('Maths', 97)]\nassert subject_marks([('Telugu',49),('Hindhi',54),('Social',33)])==([('Social',33),('Telugu',49),('Hindhi',54)])\nassert subject_marks([('Physics',96),('Chemistry',97),('Biology',45)])==([('Biology',45),('Physics',96),('Chemistry',97)])","source_id":"64","source_row_sha256":"f02198ffbf35e208286f14a3930fe42244d25d33854dcf25aec64a933bc0d0a1"},{"category":"Python","id":"mbpp-65","prompt":"Write a function of recursion list sum.\n\nSource prompt examples:\nassert recursive_list_sum(([1, 2, [3,4],[5,6]]))==21\nassert recursive_list_sum(([7, 10, [15,14],[19,41]]))==106\nassert recursive_list_sum(([10, 20, [30,40],[50,60]]))==210","source_id":"65","source_row_sha256":"3ea9bc953e045377f3e17561cad6a6773e0dcfee93381d589b73fb38e74c7cd5"},{"category":"Python","id":"mbpp-66","prompt":"Write a python function to count positive numbers in a list.\n\nSource prompt examples:\nassert pos_count([1,-2,3,-4]) == 2\nassert pos_count([3,4,5,-1]) == 3\nassert pos_count([1,2,3,4]) == 4","source_id":"66","source_row_sha256":"4ef5fb5e46d0adb9e7cbfb376c65db6b77933328d44eb76da1af1489ee4f9f64"},{"category":"Python","id":"mbpp-67","prompt":"Write a function to find the number of ways to partition a set of bell numbers.\n\nSource prompt examples:\nassert bell_number(2)==2\nassert bell_number(10)==115975\nassert bell_number(56)==6775685320645824322581483068371419745979053216268760300","source_id":"67","source_row_sha256":"4bad6bfdd25b40724b8e197220b3dec8f5ed78d95c324759ab8160703da5f2d0"},{"category":"Python","id":"mbpp-68","prompt":"Write a python function to check whether the given array is monotonic or not.\n\nSource prompt examples:\nassert is_Monotonic([6, 5, 4, 4]) == True\nassert is_Monotonic([1, 2, 2, 3]) == True\nassert is_Monotonic([1, 3, 2]) == False","source_id":"68","source_row_sha256":"b1601fd5b24a04f1337755856e449f46c31adff2b02d48acba8cf53efeafbbc9"},{"category":"Python","id":"mbpp-69","prompt":"Write a function to check whether a list contains the given sublist or not.\n\nSource prompt examples:\nassert is_sublist([2,4,3,5,7],[3,7])==False\nassert is_sublist([2,4,3,5,7],[4,3])==True\nassert is_sublist([2,4,3,5,7],[1,6])==False","source_id":"69","source_row_sha256":"e322adbdce193112498e970c5e8bed7e69fe0c6df7433ee6ecb0c68f89fdc2a3"},{"category":"Python","id":"mbpp-70","prompt":"Write a function to find whether all the given tuples have equal length or not.\n\nSource prompt examples:\nassert get_equal([(11, 22, 33), (44, 55, 66)], 3) == 'All tuples have same length'\nassert get_equal([(1, 2, 3), (4, 5, 6, 7)], 3) == 'All tuples do not have same length'\nassert get_equal([(1, 2), (3, 4)], 2) == 'All tuples have same length'","source_id":"70","source_row_sha256":"1a3685d510ca042752d1e2499c2f6b22ca3cfe814578b4ff43909dae297cc469"},{"category":"Python","id":"mbpp-71","prompt":"Write a function to sort a list of elements using comb sort.\n\nSource prompt examples:\nassert comb_sort([5, 15, 37, 25, 79]) == [5, 15, 25, 37, 79]\nassert comb_sort([41, 32, 15, 19, 22]) == [15, 19, 22, 32, 41]\nassert comb_sort([99, 15, 13, 47]) == [13, 15, 47, 99]","source_id":"71","source_row_sha256":"1f4640efe382e54d5409de101bf587cd53971d8f891be882bcf6b3bf27777220"},{"category":"Python","id":"mbpp-72","prompt":"Write a python function to check whether the given number can be represented as difference of two squares or not.\n\nSource prompt examples:\nassert dif_Square(5) == True\nassert dif_Square(10) == False\nassert dif_Square(15) == True","source_id":"72","source_row_sha256":"bddcb4fac1122d596628597326ec8c86fafd8d1b707dfc8563aea8d4a5eec14d"},{"category":"Python","id":"mbpp-73","prompt":"Write a function to split the given string with multiple delimiters by using regex.\n\nSource prompt examples:\nassert multiple_split('Forces of the \\ndarkness*are coming into the play.') == ['Forces of the ', 'darkness', 'are coming into the play.']\nassert multiple_split('Mi Box runs on the \\n Latest android*which has google assistance and chromecast.') == ['Mi Box runs on the ', ' Latest android', 'which has google assistance and chromecast.']\nassert multiple_split('Certain services\\nare subjected to change*over the seperate subscriptions.') == ['Certain services', 'are subjected to change', 'over the seperate subscriptions.']","source_id":"73","source_row_sha256":"1b1c8893606f0be68fc49c3f6fe6960d040868f23957b6313a05bcf854cd5902"},{"category":"Python","id":"mbpp-74","prompt":"Write a function to check whether it follows the sequence given in the patterns array.\n\nSource prompt examples:\nassert is_samepatterns([\"red\",\"green\",\"green\"], [\"a\", \"b\", \"b\"])==True \nassert is_samepatterns([\"red\",\"green\",\"greenn\"], [\"a\",\"b\",\"b\"])==False \nassert is_samepatterns([\"red\",\"green\",\"greenn\"], [\"a\",\"b\"])==False ","source_id":"74","source_row_sha256":"4a755e807c44a01a05c05a40a4e965b5444e8aef8eeeeb49b604c05c6e319b50"},{"category":"Python","id":"mbpp-75","prompt":"Write a function to find tuples which have all elements divisible by k from the given list of tuples.\n\nSource prompt examples:\nassert find_tuples([(6, 24, 12), (7, 9, 6), (12, 18, 21)], 6) == '[(6, 24, 12)]'\nassert find_tuples([(5, 25, 30), (4, 2, 3), (7, 8, 9)], 5) == '[(5, 25, 30)]'\nassert find_tuples([(7, 9, 16), (8, 16, 4), (19, 17, 18)], 4) == '[(8, 16, 4)]'","source_id":"75","source_row_sha256":"425161607a5b47529d481f7affaf22252893b7a7ca145360a9a086ebc047691b"},{"category":"Python","id":"mbpp-76","prompt":"Write a python function to count the number of squares in a rectangle.\n\nSource prompt examples:\nassert count_Squares(4,3) == 20\nassert count_Squares(2,2) == 5\nassert count_Squares(1,1) == 1","source_id":"76","source_row_sha256":"0751f00ddfa0acf137eb8a4f56f713aa99cd05afd8b96cf764a0b708a1e3ca86"},{"category":"Python","id":"mbpp-77","prompt":"Write a python function to find the difference between sum of even and odd digits.\n\nSource prompt examples:\nassert is_Diff (12345) == False\nassert is_Diff(1212112) == True\nassert is_Diff(1212) == False","source_id":"77","source_row_sha256":"1df351648219dc99ab29e2fec690f4f3370682a762d70218f9028a88f537f70d"},{"category":"Python","id":"mbpp-78","prompt":"Write a python function to find number of integers with odd number of set bits.\n\nSource prompt examples:\nassert count_With_Odd_SetBits(5) == 3\nassert count_With_Odd_SetBits(10) == 5\nassert count_With_Odd_SetBits(15) == 8","source_id":"78","source_row_sha256":"a6ccdf3b8137d134e3bfe8a4787ad9bb86047f858f9f6203a9fb6e01b5ed21d3"},{"category":"Python","id":"mbpp-79","prompt":"Write a python function to check whether the length of the word is odd or not.\n\nSource prompt examples:\nassert word_len(\"Hadoop\") == False\nassert word_len(\"great\") == True\nassert word_len(\"structure\") == True","source_id":"79","source_row_sha256":"1c07a3b9a15c8465db6e75798b7e6997311ee0cd43885c910cbfe32db70a2f09"},{"category":"Python","id":"mbpp-80","prompt":"Write a function to find the nth tetrahedral number.\n\nSource prompt examples:\nassert tetrahedral_number(5) == 35.0\nassert tetrahedral_number(6) == 56.0\nassert tetrahedral_number(7) == 84.0","source_id":"80","source_row_sha256":"5fc3677bd6f4d68873afbd439c6ade83ddb481151175d0dc5c89f70b55664138"},{"category":"Python","id":"mbpp-81","prompt":"Write a function to zip the two given tuples.\n\nSource prompt examples:\nassert zip_tuples((7, 8, 4, 5, 9, 10),(1, 5, 6) ) == [(7, 1), (8, 5), (4, 6), (5, 1), (9, 5), (10, 6)]\nassert zip_tuples((8, 9, 5, 6, 10, 11),(2, 6, 7) ) == [(8, 2), (9, 6), (5, 7), (6, 2), (10, 6), (11, 7)]\nassert zip_tuples((9, 10, 6, 7, 11, 12),(3, 7, 8) ) == [(9, 3), (10, 7), (6, 8), (7, 3), (11, 7), (12, 8)]","source_id":"81","source_row_sha256":"1a04e561ace72e07ac189adcd71e45ab204737397010186f21442bdeb65874e7"},{"category":"Python","id":"mbpp-82","prompt":"Write a function to find the volume of a sphere.\n\nSource prompt examples:\nassert volume_sphere(10)==4188.790204786391\nassert volume_sphere(25)==65449.84694978735\nassert volume_sphere(20)==33510.32163829113","source_id":"82","source_row_sha256":"8fd897435d5d43ac4b4b3f5fde6c0ebda888dd0dcfc2202cb1fc365509152b04"},{"category":"Python","id":"mbpp-83","prompt":"Write a python function to find the character made by adding all the characters of the given string.\n\nSource prompt examples:\nassert get_Char(\"abc\") == \"f\"\nassert get_Char(\"gfg\") == \"t\"\nassert get_Char(\"ab\") == \"c\"","source_id":"83","source_row_sha256":"c255064caf64e36f3e89b9dc345e5aec6759ec34070df62192415519b49dbfce"},{"category":"Python","id":"mbpp-84","prompt":"Write a function to find the n-th number in newman conway sequence.\n\nSource prompt examples:\nassert sequence(10) == 6\nassert sequence(2) == 1\nassert sequence(3) == 2","source_id":"84","source_row_sha256":"8a89776317f164ce0cc5afda7fc4380d01f6bf1b6e4a403115eb5506c1a72711"},{"category":"Python","id":"mbpp-85","prompt":"Write a function to find the surface area of a sphere.\n\nSource prompt examples:\nassert surfacearea_sphere(10)==1256.6370614359173\nassert surfacearea_sphere(15)==2827.4333882308138\nassert surfacearea_sphere(20)==5026.548245743669","source_id":"85","source_row_sha256":"61b0c8161c4d3fe1263051b7b1facfbaac960d53a16990927d04ef6657c5a84d"},{"category":"Python","id":"mbpp-86","prompt":"Write a function to find nth centered hexagonal number.\n\nSource prompt examples:\nassert centered_hexagonal_number(10) == 271\nassert centered_hexagonal_number(2) == 7\nassert centered_hexagonal_number(9) == 217","source_id":"86","source_row_sha256":"26f0aba7acedce602e35110ec298403e8c70327cdf3f9fb0ab5663a2eeca53b8"},{"category":"Python","id":"mbpp-87","prompt":"Write a function to merge three dictionaries into a single expression.\n\nSource prompt examples:\nassert merge_dictionaries_three({ \"R\": \"Red\", \"B\": \"Black\", \"P\": \"Pink\" }, { \"G\": \"Green\", \"W\": \"White\" },{ \"O\": \"Orange\", \"W\": \"White\", \"B\": \"Black\" })=={'B': 'Black', 'R': 'Red', 'P': 'Pink', 'G': 'Green', 'W': 'White', 'O': 'Orange'}\nassert merge_dictionaries_three({ \"R\": \"Red\", \"B\": \"Black\", \"P\": \"Pink\" }, { \"G\": \"Green\", \"W\": \"White\" },{\"L\":\"lavender\",\"B\":\"Blue\"})=={'W': 'White', 'P': 'Pink', 'B': 'Black', 'R': 'Red', 'G': 'Green', 'L': 'lavender'}\nassert merge_dictionaries_three({ \"R\": \"Red\", \"B\": \"Black\", \"P\": \"Pink\" },{\"L\":\"lavender\",\"B\":\"Blue\"},{ \"G\": \"Green\", \"W\": \"White\" })=={'B': 'Black', 'P': 'Pink', 'R': 'Red', 'G': 'Green', 'L': 'lavender', 'W': 'White'}","source_id":"87","source_row_sha256":"194838148edb4fd5d579eb73ad9ced5e7035198f012e385bfc3887f682b14caa"},{"category":"Python","id":"mbpp-88","prompt":"Write a function to get the frequency of the elements in a list.\n\nSource prompt examples:\nassert freq_count([10,10,10,10,20,20,20,20,40,40,50,50,30])==({10: 4, 20: 4, 40: 2, 50: 2, 30: 1}) \nassert freq_count([1,2,3,4,3,2,4,1,3,1,4])==({1:3, 2:2,3:3,4:3}) \nassert freq_count([5,6,7,4,9,10,4,5,6,7,9,5])==({10:1,5:3,6:2,7:2,4:2,9:2}) ","source_id":"88","source_row_sha256":"b12d8dbfd533dfdf4b2a900e52b9f0f8515a65d0f42a35b7b4f9165b9f6978d3"},{"category":"Python","id":"mbpp-89","prompt":"Write a function to find the closest smaller number than n.\n\nSource prompt examples:\nassert closest_num(11) == 10\nassert closest_num(7) == 6\nassert closest_num(12) == 11","source_id":"89","source_row_sha256":"e8d229a6d9a9ea0dab4e803b3f203034721ceae7a1130392318e9b407f5fd905"},{"category":"Python","id":"mbpp-90","prompt":"Write a python function to find the length of the longest word.\n\nSource prompt examples:\nassert len_log([\"python\",\"PHP\",\"bigdata\"]) == 7\nassert len_log([\"a\",\"ab\",\"abc\"]) == 3\nassert len_log([\"small\",\"big\",\"tall\"]) == 5","source_id":"90","source_row_sha256":"24e78dec442dc851bc78ccb1343cf2d478f8f5fd0611ebe0192514bc5de9021a"},{"category":"Python","id":"mbpp-91","prompt":"Write a function to check if a substring is present in a given list of string values.\n\nSource prompt examples:\nassert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ack\")==True\nassert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"abc\")==False\nassert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ange\")==True","source_id":"91","source_row_sha256":"6398398ca3ceab74b09b432b195ef5f2c32ee6bf8fde190501dd4cc52659e038"},{"category":"Python","id":"mbpp-92","prompt":"Write a function to check whether the given number is undulating or not.\n\nSource prompt examples:\nassert is_undulating(\"1212121\") == True\nassert is_undulating(\"1991\") == False\nassert is_undulating(\"121\") == True","source_id":"92","source_row_sha256":"821e3fa9e51926cd52361f49372c7c8730bbdccef6fcd02c6e4a3a096fe58e2d"},{"category":"Python","id":"mbpp-93","prompt":"Write a function to calculate the value of 'a' to the power 'b'.\n\nSource prompt examples:\nassert power(3,4) == 81\nassert power(2,3) == 8\nassert power(5,5) == 3125","source_id":"93","source_row_sha256":"85903a429f608c7570d91bc0baa4a1e59088e5608eff8874c57b42b837369ed3"},{"category":"Python","id":"mbpp-94","prompt":"Write a function to extract the index minimum value record from the given tuples.\n\nSource prompt examples:\nassert index_minimum([('Rash', 143), ('Manjeet', 200), ('Varsha', 100)]) == 'Varsha'\nassert index_minimum([('Yash', 185), ('Dawood', 125), ('Sanya', 175)]) == 'Dawood'\nassert index_minimum([('Sai', 345), ('Salman', 145), ('Ayesha', 96)]) == 'Ayesha'","source_id":"94","source_row_sha256":"032a5e840bb87f7d68372f55691f7b9f6abe4ea710d7df87940193e10b689973"},{"category":"Python","id":"mbpp-95","prompt":"Write a python function to find the minimum length of sublist.\n\nSource prompt examples:\nassert Find_Min_Length([[1],[1,2]]) == 1\nassert Find_Min_Length([[1,2],[1,2,3],[1,2,3,4]]) == 2\nassert Find_Min_Length([[3,3,3],[4,4,4,4]]) == 3","source_id":"95","source_row_sha256":"178cb2aed9af7376c3ce8d1c4103ab61ca22cf1749d54d3cb0bccd6a5122f033"},{"category":"Python","id":"mbpp-96","prompt":"Write a python function to find the number of divisors of a given integer.\n\nSource prompt examples:\nassert divisor(15) == 4 \nassert divisor(12) == 6\nassert divisor(9) == 3","source_id":"96","source_row_sha256":"f5b444fb89356481ac9727bfca6191e7e09011a956ae532d6a4fe0258fc8f86a"},{"category":"Python","id":"mbpp-97","prompt":"Write a function to find frequency count of list of lists.\n\nSource prompt examples:\nassert frequency_lists([[1, 2, 3, 2], [4, 5, 6, 2], [7, 8, 9, 5]])=={1: 1, 2: 3, 3: 1, 4: 1, 5: 2, 6: 1, 7: 1, 8: 1, 9: 1}\nassert frequency_lists([[1,2,3,4],[5,6,7,8],[9,10,11,12]])=={1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1,10:1,11:1,12:1}\nassert frequency_lists([[20,30,40,17],[18,16,14,13],[10,20,30,40]])=={20:2,30:2,40:2,17: 1,18:1, 16: 1,14: 1,13: 1, 10: 1}","source_id":"97","source_row_sha256":"5549f01905b4e277eb6c21fdd6343458639c27fd2b982f1aad289b50613dfdb4"},{"category":"Python","id":"mbpp-98","prompt":"Write a function to multiply all the numbers in a list and divide with the length of the list.\n\nSource prompt examples:\nassert multiply_num((8, 2, 3, -1, 7))==-67.2\nassert multiply_num((-10,-20,-30))==-2000.0\nassert multiply_num((19,15,18))==1710.0","source_id":"98","source_row_sha256":"54db72bc7f017a6e7f88e21f319cb8f48dc26696e34d399bd923164e6dccf525"},{"category":"Python","id":"mbpp-99","prompt":"Write a function to convert the given decimal number to its binary equivalent.\n\nSource prompt examples:\nassert decimal_to_binary(8) == '1000'\nassert decimal_to_binary(18) == '10010'\nassert decimal_to_binary(7) == '111' ","source_id":"99","source_row_sha256":"e09345566d51ae16abde8c1c6a673912f15f0bc76951cc9bbbda41838239bb60"}],"tasks_sha256":"21b6603974a0fab2d78059bea40e11429e7c4a420704f7aa71886d66099f9177","version":"f46ca8374b4cddef97ca4208ad986049d74d296a"}
