| prompt,prompt_tokens,compression_time,compressed_tokens,compression_ratio,compressed_text,gpt_o1_saving,compression_ratio_normalized |
| ,167,0.034,92,1.815217391304348,,0.0,0.28022670025188917 |
| ,120,0.033,61,1.9672131147540983,Prompt: Write function find similar elements listsAssesments: assert_elements((3 4 5 6) 7 10 (4 5)((1 2 3 4) 7) (3 4)(11 12 14 15 14 (13 14,0.0,0.4044862883282175 |
| ,46,0.033,24,1.9166666666666667,Prompt: Write python identify non-prime numbersAssesments: assert_prime(2) False) True(35),0.0,0.3631635413751283 |
| ,162,0.034,78,2.076923076923077,,0.0,0.4941764085340913 |
| ,68,0.033,39,1.7435897435897436,Prompt: Write function find fill 2 x 1 dominoes 3 x n boardAssesments: assert_ways(2) 3(8) 153) 2131,0.0,0.22166964484344834 |
| ,75,0.033,42,1.7857142857142858,,0.0,0.2561073127823758 |
| ,102,0.033,57,1.7894736842105263,Prompt: Write function find words 4 characters string regexAssesments: assert find_char_long('Please move back stream' find_char_long('Jing Eco Tech' find_char_long('Jhingai wulu road Zone 3''Jhingai 'wulu 'Zone',0.0,0.2591806973352777 |
| ,118,0.033,60,1.9666666666666666,,0.0,0.4040395559287246 |
| ,59,0.033,31,1.903225806451613,,0.0,0.35217536541986044 |
| ,159,0.033,75,2.12,,0.0,0.5293926672264204 |
| ,65,0.033,29,2.2413793103448274,,0.0,0.6286227163496335 |
| ,192,0.033,104,1.8461538461538463,,0.0,0.30551787982518464 |
| ,216,0.033,139,1.5539568345323742,,0.0,0.0666408938340512 |
| ,66,0.033,36,1.8333333333333333,,0.0,0.29503685045246747 |
| ,90,0.033,45,2.0,Prompt: Write function split string lowercase lettersAssesments: assert split_lowerstring'bC''y 't 'h 'o 'n''r' 'o 'g 'a 'm 'i 'n 'g,0.0,0.43129023229778896 |
| "Prompt: Write a function to find sequences of lowercase letters joined with an underscore. Assesments: assert text_lowercase_underscore(""aab_cbbbc"")==('Found a match!'), assert text_lowercase_underscore(""aab_Abbbc"")==('Not matched!'), assert text_lowercase_underscore(""Aaab_abbbc"")==('Not matched!')",74,0.032,37,2.0,"Prompt: Write function find lowercase letters underscoreAssesments: assert text_underscore""aab_cbbbc"")=='Found match! matched!Aaab_abbbc)=='Not matched' |
| Prompt: Write a function to find the perimeter of a square. Assesments: assert square_perimeter(10)==40, assert square_perimeter(5)==20, assert square_perimeter(4)==16 |
| Prompt: Write a function to remove characters from the first string which are present in the second string. Assesments: assert remove_dirty_chars(probasscurve, pros) == 'bacuve', assert remove_dirty_chars(digitalindia, talent) == 'digiidi', assert remove_dirty_chars(exoticmiles, toxic) == 'emles'Prompt: Write function remove characters first string second stringAssesments: assert remove_dirty_chars(probasscurve, == 'bacuve' 'digiidi'exoticmiles, 'emles' |
| Prompt: Write a function to find whether a given array of integers contains any duplicate element. Assesments: assert test_duplicate(([1,2,3,4,5]))==False, assert test_duplicate(([1,2,3,4, 4]))==True, assert test_duplicate([1,1,2,2,3,3,4,4,5])==TruePrompt: Write function find array integers duplicateAssesments: assert test_duplicate[1,2,3,4,5][1,2,3,4 4,2,3,4,5] |
| Prompt: Write a function to check if the given number is woodball or not. Assesments: assert is_woodall(383) == True, assert is_woodall(254) == False, assert is_woodall(200) == False |
| Prompt: Write a function to find m number of multiples of n. Assesments: assert multiples_of_num(4,3)== [3,6,9,12], assert multiples_of_num(2,5)== [5,10], assert multiples_of_num(9,2)== [2,4,6,8,10,12,14,16,18]Prompt: Write function find multiples nAssesments: assert [3,6,9,12(2,5,10(9 [2,4,6,8,10,12,18 |
| Prompt: Write a function to find the first duplicate element in a given array of integers. Assesments: assert find_first_duplicate(([1, 2, 3, 4, 4, 5]))==4, assert find_first_duplicate([1, 2, 3, 4])==-1, assert find_first_duplicate([1, 1, 2, 3, 3, 2, 2])==1Prompt: Write function find first duplicate element array integersAssesments: assert find_first_duplicate([1, 2 3 4 5]_first_duplicate([1, 2 3 4]_duplicate 3 |
| Prompt: Write a python function to find the maximum sum of elements of list in a list of lists. Assesments: assert maximum_Sum([[1,2,3],[4,5,6],[10,11,12],[7,8,9]]) == 33, assert maximum_Sum([[0,1,1],[1,1,2],[3,2,1]]) == 6, assert maximum_Sum([[0,1,3],[1,2,1],[9,8,2],[0,1,0],[6,4,8]]) == 19Prompt: Write python function find maximum elementsAssesments: assert maximum_Sum([1,2,3],5,6,11,12 33[0,1,1],1,2,2,1] 6[0,1,3][1,2,1],2],1,0],4,8]] 19 |
| Prompt: Write a function to convert the given binary number to its decimal equivalent. Assesments: assert binary_to_decimal(100) == 4, assert binary_to_decimal(1011) == 11, assert binary_to_decimal(1101101) == 109 |
| Prompt: Write a python function to find the product of non-repeated elements in a given array. Assesments: assert find_Product([1,1,2,3],4) == 6, assert find_Product([1,2,3,1,1],5) == 6, assert find_Product([1,1,4,5,6],5) == 120Prompt: Write python function find non-repeated elements arrayAssesments: assert_Product[1,1,2,3],4) 6,3,5)[1,1,4,5,6] 120 |
| Prompt: Write a function to check if the given tuple list has all k elements. Assesments: assert check_k_elements([(4, 4), (4, 4, 4), (4, 4), (4, 4, 4, 4), (4, )], 4) == True, assert check_k_elements([(7, 7, 7), (7, 7)], 7) == True, assert check_k_elements([(9, 9), (9, 9, 9, 9)], 7) == FalsePrompt: Write function check tuple list k elementsAssesments: assert check_k_elements([(4, 4),] 4) True assert check_k_elements([(7, 7, 7)] == True assert check_k_elements([(9, 9),] 7) False |
| Prompt: Write a python function to remove all digits from a list of strings. Assesments: assert remove(['4words', '3letters', '4digits']) == ['words', 'letters', 'digits'], assert remove(['28Jan','12Jan','11Jan']) == ['Jan','Jan','Jan'], assert remove(['wonder1','wonder2','wonder3']) == ['wonder','wonder','wonder'] |
| Prompt: Write a python function to find binomial co-efficient. Assesments: assert binomial_Coeff(5,2) == 10, assert binomial_Coeff(4,3) == 4, assert binomial_Coeff(3,2) == 3Prompt: Write python function find binomial co-efficientAssesments: assert,2) 10,3) 4,2) 3 |
| Prompt: Write a python function to find the element occurring odd number of times. Assesments: assert get_Odd_Occurrence([1,2,3,1,2,3,1],7) == 1, assert get_Odd_Occurrence([1,2,3,2,3,1,3],7) == 3, assert get_Odd_Occurrence([2,3,5,4,5,2,4,3,5,2,4,4,2],13) == 5Prompt: Write python function find element odd timesAssesments: assert_Odd_Occurrence([1,2,3,7) == 1(,3],7) 3([2,3,5,4,5,13) == 5 |
| Prompt: Write a python function to count all the substrings starting and ending with same characters. Assesments: assert count_Substring_With_Equal_Ends(abc) == 3, assert count_Substring_With_Equal_Ends(abcda) == 6, assert count_Substring_With_Equal_Ends(ab) == 2Prompt: Write python function count substrings same charactersAssesments: assert count_Substring_Equal_Ends(abc) == 3abcda) 6ab) 2 |
| 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. Assesments: assert 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], assert 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], assert 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]Prompt: Write function find top k integers heap queue algorithmAssesments: assert func(, 2, 6 [1 3, 4 5 7, 8 9 5 7 11 8[5, 7 1 assert func, 2, 6] 3 4 5 7, 8 9 5 7 11 4 7 8 assert func, 2, 6 [1 3 4 5 7, 8 8 9 5 7 11 4 7 8 12]][6, 5, 7, 8, 1] |
| Prompt: Write a python function to find the largest prime factor of a given number. Assesments: assert max_Prime_Factors(15) == 5, assert max_Prime_Factors(6) == 3, assert max_Prime_Factors(2) == 2 |
| Prompt: Write a python function to convert a decimal number to binary number. Assesments: assert decimal_To_Binary(10) == 1010, assert decimal_To_Binary(1) == 1, assert decimal_To_Binary(20) == 10100 |
| Prompt: Write a python function to find the missing number in a sorted array. Assesments: assert find_missing([1,2,3,5],4) == 4, assert find_missing([1,3,4,5],4) == 2, assert find_missing([1,2,3,5,6,7],5) == 4Prompt: Write python function find missing number arrayAssesments: assert find_missing[1,2,3,5,4) 4[1,3,4,5 2 4 |
| Prompt: Write a function to find the n-th rectangular number. Assesments: assert find_rect_num(4) == 20, assert find_rect_num(5) == 30, assert find_rect_num(6) == 42 |
| Prompt: Write a python function to find the nth digit in the proper fraction of two given numbers. Assesments: assert find_Nth_Digit(1,2,1) == 5, assert find_Nth_Digit(3,5,1) == 6, assert find_Nth_Digit(5,6,5) == 3Prompt: Write python function find nth digit numbersAssesments: assert_Nth_Digit(1,2,1) 5(3,5,1) 6,6,5) 3 |
| Prompt: Write a function to sort a given mixed list of integers and strings. Assesments: assert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white'], assert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white'], assert sort_mixed_list([19,'red',12,'green','blue', 10,'white','green',1])==[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']Prompt: Write function sort mixed list integers stringsAssesments: assert sort_mixed_list([19,'red,12,'green 10'white'green',1][1 10 12 19, 'blue sort_mixed_list([19,'green 10,'white',1] 10 12 19,_mixed_list([19,'red,12'green 10,'white',1][1 10 12 19, 'blue' 'green'",0.0,0.28947548792816863 |
| "Prompt: Write a function to find the division of first even and odd number of a given list. Assesments: assert div_even_odd([1,3,5,7,4,1,6,8])==4, assert div_even_odd([1,2,3,4,5,6,7,8,9,10])==2, assert div_even_odd([1,5,7,9,10])==10",96,0.033,54,1.7777777777777777,"Prompt: Write function division even odd listAssesments: assert div_even_odd,3,5,7,4,6,8)==4,3,4,5,6,7,8,9,10,7,9,10]",0.0,0.249619056504027 |
| "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. Assesments: assert rearange_string(""aab"")==('aba'), assert rearange_string(""aabb"")==('abab'), assert rearange_string(""abccdd"")==('cdabcd')",70,0.033,41,1.7073170731707317,"Prompt: Write function check letters string rearranged two characters adjacent differentAssesments: assert rearange_string(""aab"")==('abaaabb)==('abab""abccdd"")==('cdabcd'",0.0,0.1920160007645416 |
| "Prompt: Write a function to find frequency of the elements in a given list of lists using collections module. Assesments: assert 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}), assert 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}), assert 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})",291,0.034,145,2.0068965517241377,"Prompt: Write function find frequency elements collections moduleAssesments: assert freq_element, 2 3 5 6, 1 9{2: 3 5 6 7 9 1 assert freq_element[1,2,3,4,7,8,10,11,12]]{1: 1 2: 3: 5 6 7 8 9 10 11 12: freq_element[15,20,30,40][80,90,100,110 3 80 2 90 2 15 1 20 1 40 1 100: 1 110: 1",0.0,0.4369283032706986 |
| "Prompt: Write a function to filter even numbers using lambda function. Assesments: assert filter_evennumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 4, 6, 8, 10], assert filter_evennumbers([10,20,45,67,84,93])==[10,20,84], assert filter_evennumbers([5,7,9,8,6,4,3])==[8,6,4]",119,0.033,61,1.9508196721311475,"Prompt: Write function filter numbers lambdaAssesments: assert filter_evennumbers 8 10 4 6 8 10,20,45,67,84,93],20,84[5,7,9,8,6,4,3][8,6,4",0.0,0.39108431634343177 |
| "Prompt: Write a python function to find the sum of repeated elements in a given array. Assesments: assert find_Sum([1,2,3,1,1,4,5,6],8) == 3, assert find_Sum([1,2,3,1,1],5) == 3, assert find_Sum([1,1,2],3) == 2",86,0.033,48,1.7916666666666667,"Prompt: Write python function find sum elements arrayAssesments: assert find_Sum([1,2,3,8) 3[1,2,3,1,5) 3,1,2,3)",0.0,0.26097350499113725 |
| "Prompt: Write a function to find sequences of lowercase letters joined with an underscore using regex. Assesments: assert text_match(""aab_cbbbc"") == 'Found a match!', assert text_match(""aab_Abbbc"") == 'Not matched!', assert text_match(""Aaab_abbbc"") == 'Not matched!'",67,0.032,38,1.763157894736842,"Prompt: Write function find lowercase letters underscore regexAssesments: assert text_match""aab_cbbbc"") 'Found match_Abbbc) 'Not matched!_abbbc"") matched",0.0,0.23766700546496375 |
| "Prompt: Write a function that matches a word at the beginning of a string. Assesments: assert text_match_string("" python"")==('Not matched!'), assert text_match_string(""python"")==('Found a match!'), assert text_match_string("" lang"")==('Not matched!')",58,0.032,28,2.0714285714285716,"Prompt: Write function matches word beginning stringAssesments: assert text_match_string python"")=='Not matched!'Found match!'Not matched!'",0.0,0.48968453880292684 |
| "Prompt: Write a function to find the gcd of the given array elements. Assesments: assert get_gcd([2, 4, 6, 8, 16]) == 2, assert get_gcd([1, 2, 3]) == 1, assert get_gcd([2, 4, 6, 8]) == 2",78,0.033,39,2.0,Prompt: Write function find gcd array elementsAssesments: assert get_gcd([2 4 6 8 16]([1 3][2 4 6 8,0.0,0.43129023229778896 |
| "Prompt: Write a python function to determine whether all the numbers are different from each other are not. Assesments: assert test_distinct([1,5,7,9]) == True, assert test_distinct([2,4,5,5,7,9]) == False, assert test_distinct([1,2,3]) == True",73,0.032,47,1.553191489361702,"Prompt: Write python function determine numbersAssesments: assert test_distinct[1,5,7,9] True[2,4,5,5,7,9] False[1,2,3] True",0.0,0.06601520862735279 |
| "Prompt: Write a python function to find the last digit when factorial of a divides factorial of b. Assesments: assert compute_Last_Digit(2,4) == 2, assert compute_Last_Digit(6,8) == 6, assert compute_Last_Digit(1,2) == 2",65,0.033,37,1.7567567567567568,"Prompt: Write python function last digit a divides bAssesments: assert_Last_Digit(2,4) 2(6,8) 6(1,2)",0.0,0.23243394528029288 |
| "Prompt: Write a python function to set all odd bits of a given number. Assesments: assert odd_bit_set_number(10) == 15, assert odd_bit_set_number(20) == 21, assert odd_bit_set_number(30) == 31",55,0.033,28,1.9642857142857142,"Prompt: Write python function set odd bits numberAssesments: assert) == 15(20) 21,(30) 31",0.0,0.40209307904522 |
| "Prompt: Write a function to extract every first or specified element from a given two-dimensional list. Assesments: assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],0)==[1, 4, 7], assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],2)==[3, 6, 9], assert specified_element([[1, 2, 3, 2], [4, 5, 6, 2], [7, 1, 9, 5]],1)==[2,5,1]",171,0.033,90,1.9,"Prompt: Write function extract element two-dimensional listAssesments: assert specified_element(, 2, 3, 5, 6 2, 1, 9,[1, 4, 7], 2 3 5 6, 1, 9,[3, 6, 9], 2 3 5 6, 1, 9,[2,5,1]",0.0,0.34953820319059603 |
| "Prompt: Write a function to find the list with minimum length using lambda function. Assesments: assert min_length_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(1, [0]), assert min_length_list([[1,2,3,4,5],[1,2,3,4],[1,2,3],[1,2],[1]])==(1,[1]), assert min_length_list([[3,4,5],[6,7,8,9],[10,11,12],[1,2]])==(2,[1,2])",136,0.034,79,1.7215189873417722,"Prompt: Write function find minimum length lambdaAssesments: assert min_length_list([0 3 7 11 15_length_list[1,2,3,4,5,3,4,3][1,2 min_length_list([3,4,5[6,7,8,9,11,12[1,2]],[1,2]",0.0,0.2036263537714292 |
| "Prompt: Write a function to print check if the triangle is equilateral or not. Assesments: assert check_equilateral(6,8,12)==False , assert check_equilateral(6,6,12)==False, assert check_equilateral(6,6,6)==True",59,0.033,34,1.7352941176470589,"Prompt: Write function check triangle equilateralAssesments: assert check_equilateral(6,8(6,6_equilateral(6,6,6)==True",0.0,0.21488780230816087 |
| "Prompt: Write a function to caluclate area of a parallelogram. Assesments: assert parallelogram_area(10,20)==200, assert parallelogram_area(15,20)==300, assert parallelogram_area(8,9)==72",55,0.033,32,1.71875,"Prompt: Write function area parallelogramAssesments: assert_area(10,20)==200(15,20)==300(8,9)==72",0.0,0.20136265043380908 |
| "Prompt: Write a python function to check whether the first and last characters of a given string are equal or not. Assesments: assert check_Equality(""abcda"") == ""Equal"", assert check_Equality(""ab"") == ""Not Equal"", assert check_Equality(""mad"") == ""Not Equal""",63,0.033,34,1.8529411764705883,"Prompt: Write python function check first last characters string equalAssesments: assert check_Equality(""abcda"") ==""ab"") ""Not""mad"") ""Not Equal",0.0,0.31106666008132894 |
| "Prompt: Write a function to sort the given array by using counting sort. Assesments: assert counting_sort([1,23,4,5,6,7,8]) == [1, 4, 5, 6, 7, 8, 23], assert counting_sort([12, 9, 28, 33, 69, 45]) == [9, 12, 28, 33, 45, 69], assert counting_sort([8, 4, 14, 3, 2, 1]) == [1, 2, 3, 4, 8, 14]",139,0.033,71,1.9577464788732395,"Prompt: Write function sort array sortAssesments: assert counting_sort([1,23,4,5,6 [1 4 5 6 7 8 23[12 9 28, 33 69 45[8 4 14 3 2 1 [1 3 8 14",0.0,0.3967471214074258 |
| "Prompt: Write a function to find t-nth term of geometric series. Assesments: assert tn_gp(1,5,2)==16, assert tn_gp(1,5,4)==256, assert tn_gp(2,6,3)==486",54,0.033,25,2.16,"Prompt: Write function find term geometricAssesments: assert tn(1,5,2)==16,3)==486",0.0,0.5620934788692976 |
| "Prompt: Write a python function to check if a given number is one less than twice its reverse. Assesments: assert check(70) == False, assert check(23) == False, assert check(73) == True",47,0.033,27,1.7407407407407407,Prompt: Write python function check number less reverseAssesments: assert check(70) False(23) False(73) True,0.0,0.21934052720506675 |
| "Prompt: Write a python function to find the largest number that can be formed with the given digits. Assesments: assert find_Max_Num([1,2,3],3) == 321, assert find_Max_Num([4,5,6,1],4) == 6541, assert find_Max_Num([1,2,3,9],4) == 9321",80,0.033,50,1.6,"Prompt: Write python function largest number digitsAssesments: assert_Max_Num([1,2,3],3) 321[4,5,6,1] 6541[1,2,3,9] 9321",0.0,0.10428211586901767 |
| "Prompt: Write a python function to check whether the given two integers have opposite sign or not. Assesments: assert opposite_Signs(1,-2) == True, assert opposite_Signs(3,2) == False, assert opposite_Signs(-10,-10) == False",58,0.033,32,1.8125,"Prompt: Write python function check integers opposite signAssesments: assert_Signs(1,-2) True,2) False(-10,-10) False",0.0,0.2780051777218024 |
| "Prompt: Write a function to find the nth octagonal number. Assesments: assert is_octagonal(5) == 65, assert is_octagonal(10) == 280, assert is_octagonal(15) == 645",49,0.033,24,2.0416666666666665,Prompt: Write function find nth octagonal numberAssesments: assert 65) 280(15) 645,0.0,0.4653535777591192 |
| "Prompt: Write a function to find the maximum length of the subsequence with difference between adjacent elements for the given array. Assesments: assert max_len_sub([2, 5, 6, 3, 7, 6, 5, 8], 8) == 5, assert max_len_sub([-2, -1, 5, -1, 4, 0, 3], 7) == 4, assert max_len_sub([9, 11, 13, 15, 18], 5) == 1",120,0.033,64,1.875,"Prompt: Write function maximum length subsequence difference elements arrayAssesments: assert max_len_sub([2 5 6 7 8] 8)([-2 -1 5 4 3] 7)([9, 11, 13, 15 18] 5)",0.0,0.3291001959137979 |
| "Prompt: Write a python function to count number of substrings with the sum of digits equal to their length. Assesments: assert count_Substrings('112112',6) == 6, assert count_Substrings('111',3) == 6, assert count_Substrings('1101112',7) == 12",67,0.033,40,1.675,"Prompt: Write python function count substrings digits equal lengthAssesments: assert'112112',6) 6'111',3) 6'1101112',7) 12",0.0,0.16559613769941225 |
| "Prompt: Write a python function to find smallest number in a list. Assesments: assert smallest_num([10, 20, 1, 45, 99]) == 1, assert smallest_num([1, 2, 3]) == 1, assert smallest_num([45, 46, 50, 60]) == 45",74,0.033,39,1.8974358974358974,Prompt: Write python function find smallest number listAssesments: assert_num[10 20 45 99] 1 2 3][45 46 50 60],0.0,0.34744199731605263 |
| "Prompt: Write a function to find the maximum difference between available pairs in the given tuple list. Assesments: assert max_difference([(3, 5), (1, 7), (10, 3), (1, 2)]) == 7, assert max_difference([(4, 6), (2, 17), (9, 13), (11, 12)]) == 15, assert max_difference([(12, 35), (21, 27), (13, 23), (41, 22)]) == 23",115,0.033,64,1.796875,"Prompt: Write function maximum difference pairsAssesments: assert max_difference, 5) (1, 7) (10, 3) 7, 6) (2, (9, (11, 12 15, (21, (13, (41, 22) 23",0.0,0.2652314231738035 |
| "Prompt: Write a function to sort a list of tuples using lambda. Assesments: assert subject_marks([('English', 88), ('Science', 90), ('Maths', 97), ('Social sciences', 82)])==[('Social sciences', 82), ('English', 88), ('Science', 90), ('Maths', 97)], assert subject_marks([('Telugu',49),('Hindhi',54),('Social',33)])==([('Social',33),('Telugu',49),('Hindhi',54)]), assert subject_marks([('Physics',96),('Chemistry',97),('Biology',45)])==([('Biology',45),('Physics',96),('Chemistry',97)])",159,0.034,83,1.9156626506024097,"Prompt: Write function sort list tuples using lambdaAssesments: assert subject_marks('English' 88),'Science' 90),'Maths' 97),'Social sciences' 82)])=='Social sciences'Maths] subject_marks('Telugu',49)'Hindhi',54)'Social',33)])== subject_marks('Physics',96)'Chemistry',97)'Biology',45)])==])",0.0,0.362342737870036 |
| "Prompt: Write a function of recursion list sum. Assesments: assert recursive_list_sum(([1, 2, [3,4],[5,6]]))==21, assert recursive_list_sum(([7, 10, [15,14],[19,41]]))==106, assert recursive_list_sum(([10, 20, [30,40],[50,60]]))==210",82,0.033,43,1.9069767441860466,"Prompt: Write function recursion list sumAssesments: assert recursive_list_sum[1, 2[7, 10,14[19,41]][10, 20,40][50,60]]",0.0,0.35524183312830726 |
| "Prompt: Write a python function to count positive numbers in a list. Assesments: assert pos_count([1,-2,3,-4]) == 2, assert pos_count([3,4,5,-1]) == 3, assert pos_count([1,2,3,4]) == 4",65,0.033,37,1.7567567567567568,"Prompt: Write python function count positive numbers listAssesments: assert_count 2,4,5-1] 3[1,2,3,4] 4",0.0,0.23243394528029288 |
| "Prompt: Write a function to find the number of ways to partition a set of bell numbers. Assesments: assert bell_number(2)==2, assert bell_number(10)==115975, assert bell_number(56)==6775685320645824322581483068371419745979053216268760300",65,0.033,41,1.5853658536585367,Prompt: Write function bell numbersAssesments: assert_number(2)==2)==115975(56)==6775685320645824322581483068371419745979053216268760300,0.0,0.09231840429235529 |
| "Prompt: Write a python function to check whether the given array is monotonic or not. Assesments: assert is_Monotonic([6, 5, 4, 4]) == True, assert is_Monotonic([1, 2, 2, 3]) == True, assert is_Monotonic([1, 3, 2]) == False",81,0.033,46,1.7608695652173914,"Prompt: Write python function check array monotonicAssesments: assert_Monotonic([6, 5, 4])([1, 2, 3]([1, 3, 2] False",0.0,0.23579624965015394 |
| "Prompt: Write a function to check whether a list contains the given sublist or not. Assesments: assert is_sublist([2,4,3,5,7],[3,7])==False, assert is_sublist([2,4,3,5,7],[4,3])==True, assert is_sublist([2,4,3,5,7],[1,6])==False",87,0.033,52,1.6730769230769231,"Prompt: Write function check list sublistAssesments: assert_sublist([2,4,3,5,7][3,7]([2,4,3,5,7[4,3])==True[1,6]",0.0,0.1640239832935047 |
| "Prompt: Write a function to find whether all the given tuples have equal length or not. Assesments: assert get_equal([(11, 22, 33), (44, 55, 66)], 3) == 'All tuples have same length', assert get_equal([(1, 2, 3), (4, 5, 6, 7)], 3) == 'All tuples do not have same length', assert get_equal([(1, 2), (3, 4)], 2) == 'All tuples have same length'",117,0.033,62,1.8870967741935485,"Prompt: Write function find tuples equal lengthAssesments: assert get_equal((11 22, (44 55 66) tuples same length_equal([(1 2 3) (4 5 6 7) length_equal([(1 2) (3 4) tuples same length",0.0,0.33898955427353905 |
| "Prompt: Write a function to sort a list of elements using comb sort. Assesments: assert comb_sort([5, 15, 37, 25, 79]) == [5, 15, 25, 37, 79], assert comb_sort([41, 32, 15, 19, 22]) == [15, 19, 22, 32, 41], assert comb_sort([99, 15, 13, 47]) == [13, 15, 47, 99]",115,0.033,60,1.9166666666666667,"Prompt: Write function sort elements comb sortAssesments: assert comb_sort([5, 15, 37 25 79]([41, 32, 15, 19, 22]_sort([99, 15, 13, 47] [13 47",0.0,0.3631635413751283 |
| "Prompt: Write a python function to check whether the given number can be represented as difference of two squares or not. Assesments: assert dif_Square(5) == True, assert dif_Square(10) == False, assert dif_Square(15) == True",56,0.037,33,1.696969696969697,Prompt: Write python function check number squaresAssesments: assert dif_Square(5) True dif_Square(10) False_Square(15) True,0.0,0.183556810760841 |
| "Prompt: Write a function to split the given string with multiple delimiters by using regex. Assesments: assert multiple_split('Forces of the \ndarkness*are coming into the play.') == ['Forces of the ', 'darkness', 'are coming into the play.'], assert 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.'], assert multiple_split('Certain services\nare subjected to change*over the seperate subscriptions.') == ['Certain services', 'are subjected to change', 'over the seperate subscriptions.']",139,0.035,68,2.0441176470588234,Prompt: Write function split string with multiple delimiters using regex.Assesments: assert multiple_split('Forces of \ndarkness coming into play.') == [ assert multiple_split('Mi Box runs Latest android google assistance chromecast.') ['Mi Box android google assert multiple_split('Certain services subjected to change*over seperate subscriptions') change subscriptions,0.0,0.46735730396272684 |
| ,86,0.035,51,1.6862745098039216,,0.0,0.1748132782360075 |
| ,164,0.034,89,1.8426966292134832,,0.0,0.30269153482580025 |
| ,58,0.032,32,1.8125,,0.0,0.2780051777218024 |
| ,55,0.033,25,2.2,Prompt: Write python function find difference sum even odd digitsAssesments: assert_Diff (12345) False True False,0.0,0.5947942905121748 |
| ,63,0.033,33,1.9090909090909092,Prompt: Write python function find integers odd bitsAssesments: assert count_Odd_SetBits(5) == 3) 5(15) 8,0.0,0.35697020583670463 |
| ,50,0.033,29,1.7241379310344827,,0.0,0.20576739338139483 |
| ,55,0.034,29,1.896551724137931,Prompt: Write function find nth tetrahedral numberAssesments: assert 35.0 56.0(7) 84.0,0.0,0.3467191677041412 |
| ,220,0.034,109,2.018348623853211,,0.0,0.44629060461103526 |
| ,61,0.033,30,2.033333333333333,Prompt: Write function find volume sphereAssesments: assert)==4188.790204786391.84694978735.32163829113,0.0,0.4585409086668531 |
| ,59,0.033,34,1.7352941176470589,,0.0,0.21488780230816087 |
| ,48,0.034,25,1.92,Prompt: Write function find n-th number newman conway sequenceAssesments: assert) 6 1 2,0.0,0.3658886090120346 |
| ,67,0.033,33,2.0303030303030303,Prompt: Write function find surface area sphereAssesments: assert)==1256.6370614359173.4333882308138.548245743669,0.0,0.4560635744514837 |
| ,52,0.033,25,2.08,Prompt: Write function find centered hexagonal numberAssesments: assert_number(10) == 271 7 217,0.0,0.4966918555835433 |
| ,288,0.034,146,1.9726027397260273,,0.0,0.40889241610403737 |
| ,182,0.033,97,1.8762886597938144,,0.0,0.33015370144352973 |
| ,47,0.033,27,1.7407407407407407,Prompt: Write function find closest smaller nAssesments: assert_num(11) 10(7) 6) 11,0.0,0.21934052720506675 |
| ,62,0.033,31,2.0,Prompt: Write python function find length longest wordAssesments: assert len_log( == 7 assert len_log( 3 len_log( 5,0.0,0.43129023229778896 |
| ,95,0.034,47,2.021276595744681,,0.0,0.4486842810440003 |
| ,56,0.033,31,1.8064516129032258,,0.0,0.2730604985419318 |
| ,56,0.032,35,1.6,,0.0,0.10428211586901767 |
| ,116,0.033,72,1.6111111111111112,Prompt: Write function extract index minimum tuplesAssesments: assert index_minimum('Rash''Manjeet'Varsha 100) 'Varsha' index_minimum'Yash'Dawood'Sanya 175) 'Dawood' assert index_minimum'Sai' 345)'Salman''Ayesha' 'Ayesha',0.0,0.11336567465870573 |
| "Prompt: Write a python function to find the minimum length of sublist. Assesments: assert Find_Min_Length([[1],[1,2]]) == 1, assert Find_Min_Length([[1,2],[1,2,3],[1,2,3,4]]) == 2, assert Find_Min_Length([[3,3,3],[4,4,4,4]]) == 3",83,0.033,43,1.930232558139535,"Prompt: Write python function find minimum length sublistAssesments: assert Find_Min_Length( == 1],3],3,4]] 2[3,3,3][4,4 3",0.0,0.3742539329206777 |
| "Prompt: Write a python function to find the number of divisors of a given integer. Assesments: assert divisor(15) == 4 , assert divisor(12) == 6, assert divisor(9) == 3",48,0.033,26,1.8461538461538463,Prompt: Write python function find divisors integerAssesments: assert divisor(15) == 4) 6 3,0.0,0.30551787982518464 |
| "Prompt: Write a function to find frequency count of list of lists. Assesments: assert 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}, assert 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}, assert 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}",280,0.033,142,1.971830985915493,"Prompt: Write function find frequency countAssesments: assert frequency_lists 2 3 5 6 8 9{1: 1 2: 3 5 6 7 8 9_lists[1,2,3,4,7,8,10,11,12]] 1 2: 5 6 7 8 9,12:1 assert frequency[20,30,40,17[18,16,14,13,20,30,40]]{20:2,30,17 1,18:1 16 1,14 1,13: 1 10: 1",0.0,0.4082614917042135 |
| "Prompt: Write a function to multiply all the numbers in a list and divide with the length of the list. Assesments: assert multiply_num((8, 2, 3, -1, 7))==-67.2, assert multiply_num((-10,-20,-30))==-2000.0, assert multiply_num((19,15,18))==1710.0",80,0.033,42,1.9047619047619047,"Prompt: Write function multiply numbers list divide lengthAssesments: assert multiply_num((8 2 3 -1 7))==-67.2(-10,-20,-30,15,18)",0.0,0.3534311569576052 |
| "Prompt: Write a function to convert the given decimal number to its binary equivalent. Assesments: assert decimal_to_binary(8) == '1000', assert decimal_to_binary(18) == '10010', assert decimal_to_binary(7) == '111'",55,0.032,30,1.8333333333333333,Prompt: Write function convert decimal binary equivalentAssesments: assert_binary(8) '1000) '10010(7) '111',0.0,0.29503685045246747 |
| "Prompt: Write a function to find the next smallest palindrome of a specified number. Assesments: assert next_smallest_palindrome(99)==101, assert next_smallest_palindrome(1221)==1331, assert next_smallest_palindrome(120)==121",54,0.035,24,2.25,Prompt: Write function find next smallest palindrome specified numberAssesments: assert next_smallest_palindrome(99)==101,0.0,0.635670305065771 |
| "Prompt: Write a function to find the kth element in the given array. Assesments: assert kth_element([12,3,5,7,19], 5, 2) == 3, assert kth_element([17,24,8,23], 4, 3) == 8, assert kth_element([16,21,25,36,4], 5, 4) == 36",88,0.034,50,1.76,"Prompt: Write function find kth element arrayAssesments: assert,3,5,7,19 5 3,24,8,23 4 8,21,25,36,4 5 4) 36",0.0,0.23508536244052614 |
| "Prompt: Write a function to convert snake case string to camel case string. Assesments: assert snake_to_camel('python_program')=='PythonProgram', assert snake_to_camel('python_language')==('PythonLanguage'), assert snake_to_camel('programming_language')==('ProgrammingLanguage')",61,0.034,32,1.90625,Prompt: Write function convert snake camelAssesments: assert snake_to_camel('python_program)=='PythonProgram('python_language'PythonLanguage('programming_language,0.0,0.35464770500979564 |
| ,64,0.035,34,1.8823529411764706,,0.0,0.33511137452462086 |
| ,166,0.036,104,1.5961538461538463,,0.0,0.10113780705720257 |
| ,57,0.034,26,2.1923076923076925,Prompt: Write python function count true booleans listAssesments: assert count([True == 2 0 3,0.0,0.5885056728885446 |
| ,121,0.035,61,1.9836065573770492,,0.0,0.4178882603130032 |
| ,60,0.035,31,1.935483870967742,,0.0,0.3785469877125033 |
| ,389,0.037,176,2.210227272727273,,0.0,0.6031552934890467 |
| ,65,0.034,36,1.8055555555555556,,0.0,0.27232795347824734 |
| ,222,0.035,118,1.88135593220339,,0.0,0.33429629945874667 |
| ,199,0.034,101,1.9702970297029703,,0.0,0.40700745137486033 |
| ,50,0.034,29,1.7241379310344827,,0.0,0.20576739338139483 |
| ,44,0.034,27,1.6296296296296295,,0.0,0.12850493930818577 |
| ,280,0.035,154,1.8181818181818181,,0.0,0.2826501793756201 |
| ,57,0.034,30,1.9,Prompt: Write function check dictionaries list emptyAssesments: assert empty_dit({})==True)==False assert empty_dit({})==True,0.0,0.34953820319059603 |
| ,62,0.034,35,1.7714285714285714,,0.0,0.24442845148134812 |
| ,253,0.047,141,1.7943262411347518,,0.0,0.2631477610844136 |
| ,83,0.035,44,1.8863636363636365,,0.0,0.33839019922143354 |
| ,95,0.035,49,1.9387755102040816,,0.0,0.3812379695790994 |
| ,107,0.035,60,1.7833333333333334,,0.0,0.25416083589887123 |
| ,130,0.052,63,2.0634920634920637,Prompt: Write function find triplet sum arrayAssesments: assert check_triplet 7 4 9 5 3 8 6 True_triplet[1 4 5 9 6 False assert_triplet[10 4 2 3 5 15 0 True,0.0,0.48319628252457825 |
| ,48,0.033,26,1.8461538461538463,Prompt: Write function find numberAssesments: assert smartNumber(1) 30(50) 273 2664,0.0,0.30551787982518464 |
| ,54,0.034,31,1.7419354838709677,Prompt: Write function sum amicable numbers 1 specifiedAssesments: assert_sum(999)==504(9999)==31626(99)==0,0.0,0.22031725395664614 |
| ,71,0.034,32,2.21875,,0.0,0.6101227959697733 |
| ,83,0.034,43,1.930232558139535,Prompt: Write function find maximum difference 0s 1s sub-string binary stringAssesments: assert find_length( 11 == 6_length( 5) == 1_length 14 2,0.0,0.3742539329206777 |
| ,55,0.034,33,1.6666666666666667,,0.0,0.1587834686071462 |
| ,50,0.035,28,1.7857142857142858,,0.0,0.2561073127823758 |
| ,71,0.034,39,1.8205128205128205,,0.0,0.28455582107975047 |
| ,136,0.035,70,1.9428571428571428,,0.0,0.3845747870936787 |
| ,154,0.04,81,1.9012345679012346,,0.0,0.35054748750056147 |
| ,54,0.033,29,1.8620689655172413,,0.0,0.3185288128395919 |
| ,93,0.035,53,1.7547169811320755,,0.0,0.23076638731788202 |
| ,121,0.035,60,2.0166666666666666,,0.0,0.44491557048232105 |
| ,85,0.034,47,1.8085106382978724,,0.0,0.27474379358188783 |
| ,49,0.034,26,1.8846153846153846,Prompt: Write function find hexagonal numberAssesments: assert_num(10) 190 45(7) 91,0.0,0.33696096794333563 |
| ,50,0.034,24,2.0833333333333335,Prompt: Write function calculate electricity billAssesments: assert(75)==246.25(100)==327.5,0.0,0.4994169232204498 |
| ,150,0.034,63,2.380952380952381,,0.0,0.7427265336585235 |
| ,84,0.034,46,1.826086956521739,Prompt: Write python function check number represented sum non-zero powers 2Assesments: assert_Sum_Of_Powers_Of_Two(10) == True_Two(7) False_Two(14) True,0.0,0.2891127903722361 |
| ,63,0.034,34,1.8529411764705883,Prompt: Write function find circumference circleAssesments: assert_circumference(10)==62.830000000000005.415000000000003.132,0.0,0.31106666008132894 |
| ,159,0.035,81,1.962962962962963,,0.0,0.40101170299882866 |
| ,121,0.036,60,2.0166666666666666,,0.0,0.44491557048232105 |
| ,186,0.034,95,1.9578947368421054,,0.0,0.39686832530528676 |
| ,110,0.037,60,1.8333333333333333,,0.0,0.29503685045246747 |
| ,93,0.034,56,1.6607142857142858,,0.0,0.15391727639838476 |
| ,86,0.035,49,1.7551020408163265,,0.0,0.23108118142303094 |
| ,47,0.034,24,1.9583333333333333,,0.0,0.3972268868364585 |
| ,143,0.035,78,1.8333333333333333,,0.0,0.29503685045246747 |
| ,57,0.035,31,1.8387096774193548,Prompt: Write function divide number parts sum maximumAssesments: assert sum_digits_twoparts(35)==17(7)==7(100)==19,0.0,0.2994321208345746 |
| ,137,0.034,68,2.014705882352941,Prompt: Write function find longest subsequence difference adjacents arrayAssesments: assert longest_subseq_diff_one([1 2 3 4 5 7) 6([10 9 4 5 8 6 7) 3([1 2 3 7 8) 7,0.0,0.4433125895194349 |
| ,69,0.033,38,1.8157894736842106,,0.0,0.2806943892055917 |
| ,61,0.034,33,1.8484848484848484,,0.0,0.30742352152931485 |
| ,151,0.034,69,2.1884057971014492,Prompt: Write function sort array merge sortAssesments: assert merge_sort([3 4 2 6 5 7 1 9 assert merge_sort([7 25 45 78 11 33 19] merge_sort([3 1 4 9 8 [1 3 4 8,0.0,0.5853157943838044 |
| ,91,0.034,47,1.9361702127659575,,0.0,0.37910808605915525 |
| ,169,0.034,88,1.9204545454545454,,0.0,0.36626020914434004 |
| ,55,0.036,30,1.8333333333333333,Prompt: Write python function toggle even bits numberAssesments: assert_number(10) 0(20) 30(30) 20,0.0,0.29503685045246747 |
| ,119,0.035,60,1.9833333333333334,,0.0,0.41766489411325686 |
| ,209,0.035,113,1.8495575221238938,,0.0,0.30830045399493244 |
| ,87,0.034,51,1.7058823529411764,,0.0,0.19084308786486878 |
| ,57,0.034,31,1.8387096774193548,,0.0,0.2994321208345746 |
| ,90,0.038,54,1.6666666666666667,,0.0,0.1587834686071462 |
| ,198,0.034,97,2.0412371134020617,,0.0,0.46500240924920855 |
| ,60,0.033,28,2.142857142857143,Prompt: Write function calculate positive integers n-2) n-x =<Assesments: assert sum_series(6)==12)==30,0.0,0.5480788453080644 |
| ,66,0.034,37,1.7837837837837838,,0.0,0.25452908828223686 |
| ,55,0.034,31,1.7741935483870968,,0.0,0.24668887624928898 |
| ,70,0.034,41,1.7073170731707317,,0.0,0.1920160007645416 |
| ,86,0.034,49,1.7551020408163265,,0.0,0.23108118142303094 |
| ,68,0.034,32,2.125,Prompt: Write python function find smallest power 2 nAssesments: assert next_2(0) == 1 8(17) 32,0.0,0.53348026868178 |
| ,80,0.036,43,1.8604651162790697,,0.0,0.31721763354356636 |
| ,48,0.034,23,2.0869565217391304,Prompt: Write function calculate nth pell numberAssesments: assert 12(7) 169(8),0.0,0.5023789532605653 |
| ,133,0.037,64,2.078125,,0.0,0.4951590050377833 |
| ,47,0.035,26,1.8076923076923077,Prompt: Write function find perimeter pentagonAssesments: assert_pentagon(5)==25)==50(15)==75,0.0,0.27407479170703347 |
| ,104,0.035,59,1.7627118644067796,,0.0,0.23730236661970422 |
| ,107,0.034,48,2.2291666666666665,Prompt: Write function remove except alphanumeric characters stringAssesments: assert remove_splchar('python*program123 remove_splchar'python language'pythonprogramming24language remove_splchar'python program'python67program,0.0,0.6186386323351057 |
| "Prompt: Write a function to group a sequence of key-value pairs into a dictionary of lists. Assesments: assert group_keyvalue([('yellow', 1), ('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)])=={'yellow': [1, 3], 'blue': [2, 4], 'red': [1]}, assert group_keyvalue([('python', 1), ('python', 2), ('python', 3), ('python', 4), ('python', 5)])=={'python': [1,2,3,4,5]}, assert group_keyvalue([('yellow',100), ('blue', 200), ('yellow', 300), ('blue', 400), ('red', 100)])=={'yellow': [100, 300], 'blue': [200, 400], 'red': [100]}",192,0.036,115,1.6695652173913043,"Prompt: Write function group key-value pairs dictionary listsAssesments: assert group_keyvalue('yellow 2) 3) 4)'yellow' [1, 3] 'blue' [2, 4] 'red' [1]_keyvalue'python' 1) 2) 3) 4) 5)' [1,2,3,4,5] group_keyvalue('yellow'' 100'yellow': [100, 300] 'blue' [200, 400] 'red': [100] |
| Prompt: Write a function to verify validity of a string of parentheses. Assesments: assert is_valid_parenthese((){}[])==True, assert is_valid_parenthese(()[{)})==False, assert is_valid_parenthese(())==TruePrompt: Write function verify validity string parenthesesAssesments: assert_valid_parenthese{}[])==True[{})==False())==True |
| Prompt: Write a function to find the perimeter of a triangle. Assesments: assert perimeter_triangle(10,20,30)==60, assert perimeter_triangle(3,4,5)==12, assert perimeter_triangle(25,35,45)==105Prompt: Write function perimeter triangleAssesments: assert,20,30)==60,4,5)==12(25,35,45)==105 |
| Prompt: Write a python function to find two distinct numbers such that their lcm lies within the given range. Assesments: assert answer(3,8) == (3,6), assert answer(2,6) == (2,4), assert answer(1,3) == (1,2)Prompt: Write python function find numbers rangeAssesments: assert,8) (3,6)(2,6) (2,4),3) (1,2) |
| Prompt: Write a function to search some literals strings in a string. Assesments: assert string_literals(['language'],'python language')==('Matched!'), assert string_literals(['program'],'python language')==('Not Matched!'), assert string_literals(['python'],'programming language')==('Not Matched!') |
| Prompt: Write a function to find if the given number is a keith number or not. Assesments: assert is_num_keith(14) == True, assert is_num_keith(12) == False, assert is_num_keith(197) == True |
| Prompt: Write a function to calculate distance between two points using latitude and longitude. Assesments: assert distance_lat_long(23.5,67.5,25.5,69.5)==12179.372041317429, assert distance_lat_long(10.5,20.5,30.5,40.5)==6069.397933300514, assert distance_lat_long(10,20,30,40)==6783.751974994595Prompt: Write function calculate distance latitudeAssesments: assert distance_lat_long(23.5,67.5.5,69.5.372041317429_long(10.5,30.5,40.397933300514,20 |
| Prompt: Write a function to find the longest common prefix in the given set of strings. Assesments: assert common_prefix([tablets, tables, taxi, tamarind], 4) == 'ta', assert common_prefix([apples, ape, april], 3) == 'ap', assert common_prefix([teens, teenager, teenmar], 3) == 'teen'Prompt: Write function find longest common prefix stringsAssesments: assert common_prefixtablets, 4) == 'ta' assertapples, 3) == 'ap' assert_prefix teenmar == 'teen' |
| Prompt: Write a function to find uppercase, lowercase, special character and numeric values using regex. Assesments: assert find_character(ThisIsGeeksforGeeks) == (['T', 'I', 'G', 'G'], ['h', 'i', 's', 's', 'e', 'e', 'k', 's', 'f', 'o', 'r', 'e', 'e', 'k', 's'], [], []), assert find_character(Hithere2) == (['H'], ['i', 't', 'h', 'e', 'r', 'e'], ['2'], []), assert find_character(HeyFolks32) == (['H', 'F'], ['e', 'y', 'o', 'l', 'k', 's'], ['3', '2'], [])Prompt: Write function find uppercase lowercase special character numeric values regexAssesments: assert find_character(ThisIsGeeksforGeeks)['T 'I 'G'h 'f 'o 'r find_character(""Hithere2"")['H''i 't 'h 'e 'r'2' find_character(HeyFolks32) (['H' 'F''e' 'y 'o 'l' 'k' 's' ['3' '2'] [ |
| Prompt: Write a function to count all the distinct pairs having a difference of k in any array. Assesments: assert count_pairs([1, 5, 3, 4, 2], 5, 3) == 2, assert count_pairs([8, 12, 16, 4, 0, 20], 6, 4) == 5, assert count_pairs([2, 4, 1, 3, 4], 5, 2) == 3Prompt: Write function count pairs k arrayAssesments: assert count_pairs(, 5 3 4 2 3)[8, 12 16 4 20 6, 4) 5 4 1 3 4 2) |
| Prompt: Write a function to find all the values in a list that are greater than a specified number. Assesments: assert greater_specificnum([220, 330, 500],200)==True, assert greater_specificnum([12, 17, 21],20)==False, assert greater_specificnum([1,2,3,4],10)==FalsePrompt: Write function find values greaterAssesments: assert greater_specificnum([220, 330, 500],200([12, 17, 21]([1,2,3,4] |
| Prompt: Write a function to find the focus of a parabola. Assesments: assert parabola_focus(5,3,2)==(-0.3, 1.6), assert parabola_focus(9,8,4)==(-0.4444444444444444, 2.25), assert parabola_focus(2,4,6)==(-1.0, 4.125)Prompt: Write function find focus parabolaAssesments: assert_focus(5,3-0.3,(9,8 2.25),4,6-1.0, 4.125) |
| Prompt: Write a function to search some literals strings in a string by using regex. Assesments: assert check_literals('The quick brown fox jumps over the lazy dog.',['fox']) == 'Matched!', assert check_literals('The quick brown fox jumps over the lazy dog.',['horse']) == 'Not Matched!', assert check_literals('The quick brown fox jumps over the lazy dog.',['lazy']) == 'Matched!' |
| Prompt: Write a function to find the longest common subsequence for the given two sequences. Assesments: assert longest_common_subsequence(AGGTAB , GXTXAYB, 6, 7) == 4, assert longest_common_subsequence(ABCDGH , AEDFHR, 6, 6) == 3, assert longest_common_subsequence(AXYT , AYZX, 4, 4) == 2Prompt: Write function find longest subsequence two sequencesAssesments: assert longest_subsequenceAGGTAB 6, 7) 4ABCDGH 6, 6) 3AXYT AYZX, 4, 4) |
| Prompt: Write a python function to check whether the given number can be represented by product of two squares or not. Assesments: assert prod_Square(25) == False, assert prod_Square(30) == False, assert prod_Square(16) == True |
| Prompt: Write a python function to find the first missing positive number. Assesments: assert first_Missing_Positive([1,2,3,-1,5],5) == 4, assert first_Missing_Positive([0,-1,-2,1,5,8],6) == 2, assert first_Missing_Positive([0,1,2,5,-8],5) == 3Prompt: Write python function missing numberAssesments: assert_Positive([1,2,3-1,5],5) 4,1,5,8],6)[0,1,2,5,-8],5) |
| Prompt: Write a python function to count the number of integral co-ordinates that lie inside a square. Assesments: assert count_Intgral_Points(1,1,4,4) == 4, assert count_Intgral_Points(1,2,1,2) == 1, assert count_Intgral_Points(4,2,6,4) == 1Prompt: Write python function count integral co-ordinates squareAssesments: assert_Points(1,1,4,4) == 4(1,2) 1,2,6,4) |
| Prompt: Write a function to check whether the given month name contains 30 days or not. Assesments: assert check_monthnumber(February)==False, assert check_monthnumber(June)==True, assert check_monthnumber(April)==TruePrompt: Write function check month 30 daysAssesments: assert check_monthnumberFebruary)==FalseJune)==TrueApril)==True |
| Prompt: Write a python function to check whether a string has atleast one letter and one number. Assesments: assert check_String('thishasboth29') == True, assert check_String('python') == False, assert check_String ('string') == False |
| Prompt: Write a function to remove the duplicates from the given tuple. Assesments: assert remove_tuple((1, 3, 5, 2, 3, 5, 1, 1, 3)) == (1, 2, 3, 5), assert remove_tuple((2, 3, 4, 4, 5, 6, 6, 7, 8, 8)) == (2, 3, 4, 5, 6, 7, 8), assert remove_tuple((11, 12, 13, 11, 11, 12, 14, 13)) == (11, 12, 13, 14)Prompt: Write function remove duplicates tupleAssesments: assert remove_tuple((1, 3, 5, 2 5 1 3)) assert remove_tuple((2, 3, 4, 5, 6, 7, 8, 8)) assert remove_tuple((11, 12, 13, 14, 13) |
| Prompt: Write a python function to convert octal number to decimal number. Assesments: assert octal_To_Decimal(25) == 21, assert octal_To_Decimal(30) == 24, assert octal_To_Decimal(40) == 32Prompt: Write python function convert octal decimalAssesments: assert(25) 21,(30) 24(40) 32 |
| Prompt: Write a python function to find the first position of an element in a sorted array. Assesments: assert first([1,2,3,4,5,6,6],6,6) == 5, assert first([1,2,2,2,3,2,2,4,2],2,9) == 1, assert first([1,2,3],1,3) == 0Prompt: Write python function first position element sorted arrayAssesments: assert first([1,2,3 == 5[1,2,2],2,9 1[1,2,3],3) |
| Prompt: Write a function to remove all the tuples with length k. Assesments: assert remove_tuples([(4, 5), (4, ), (8, 6, 7), (1, ), (3, 4, 6, 7)] , 1) == [(4, 5), (8, 6, 7), (3, 4, 6, 7)], assert remove_tuples([(4, 5), (4,5), (6, 7), (1, 2, 3), (3, 4, 6, 7)] ,2) == [(1, 2, 3), (3, 4, 6, 7)], assert remove_tuples([(1, 4, 4), (4, 3), (8, 6, 7), (1, ), (3, 6, 7)] , 3) == [(4, 3), (1,)]Prompt: Write function remove tuples lengthAssesments: assert remove_tuples, 5) (8, 6, 7) (3, 4 6, 7), 5) 6 7), 5) (6, 7) (1, 2, 3) (3, 4 6, 7) 2 3) 4 6 7) 4, 4) (4, 3) (8, 6, 7), 3) (1 |
| Prompt: Write a function to perform the exponentiation of the given two tuples. Assesments: assert find_exponentio((10, 4, 5, 6), (5, 6, 7, 5)) == (100000, 4096, 78125, 7776), assert find_exponentio((11, 5, 6, 7), (6, 7, 8, 6)) == (1771561, 78125, 1679616, 117649), assert find_exponentio((12, 6, 7, 8), (7, 8, 9, 7)) == (35831808, 1679616, 40353607, 2097152)Prompt: Write function tuplesAssesments: assert, 4 5 6) (100000 4096 78125 7776)(11, 5 6 7) 8 6) (1771561 78125 1679616, 6 7 8) 9 7) (35831808 1679616 40353607 2097152) |
| Prompt: Write a function to find the largest triangle that can be inscribed in an ellipse. Assesments: assert largest_triangle(4,2)==10.392304845413264, assert largest_triangle(5,7)==4.639421805988064, assert largest_triangle(9,1)==105.2220865598093Prompt: Write function find largest triangle ellipseAssesments: assert.392304845413264(5,7)==4.639421805988064(9.2220865598093 |
| Prompt: Write a python function to find highest power of 2 less than or equal to given number. Assesments: assert highest_Power_of_2(10) == 8, assert highest_Power_of_2(19) == 16, assert highest_Power_of_2(32) == 32 |
| Prompt: Write a function to find all index positions of the maximum values in a given list. Assesments: assert position_max([12,33,23,10,67,89,45,667,23,12,11,10,54])==[7], assert position_max([1,2,2,2,4,4,4,5,5,5,5])==[7,8,9,10], assert position_max([2,1,5,6,8,3,4,9,10,11,8,12])==[11]Prompt: Write function find values listAssesments: assert position_max,33,23,54[1,2,2,2,4,4,4,5,5,5,5[7,8,9[2,1,5,6,8,3,4,9,11,8,12] |
| Prompt: Write a python function to check whether the elements in a list are same or not. Assesments: assert chkList(['one','one','one']) == True, assert chkList(['one','Two','Three']) == False, assert chkList(['bigdata','python','Django']) == False |
| Prompt: Write a function to remove even characters in a string. Assesments: assert remove_even(python)==(pto), assert remove_even(program)==(porm), assert remove_even(language)==(lnug)Prompt: Write function remove even characters stringAssesments: assert remove_evenpython)==pto),lnug) |
| Prompt: Write a python function to find the hamming distance between given two integers. Assesments: assert hamming_Distance(4,8) == 2, assert hamming_Distance(2,4) == 2, assert hamming_Distance(1,2) == 2Prompt: Write python function find hamming distance integersAssesments: assert(4,8) 2,4) 2(1,2) 2 |
| Prompt: Write a python function to count the occurrence of a given character in a string. Assesments: assert count(abcc,c) == 2, assert count(ababca,a) == 3, assert count(mnmm0pm,m) == 4Prompt: Write python function count occurrence character stringAssesments: assert countabcc, == 2 3mnmm0pm, 4 |
| Prompt: Write a function to find the inversions of tuple elements in the given tuple list. Assesments: assert inversion_elements((7, 8, 9, 1, 10, 7)) == (-8, -9, -10, -2, -11, -8), assert inversion_elements((2, 4, 5, 6, 1, 7)) == (-3, -5, -6, -7, -2, -8), assert inversion_elements((8, 9, 11, 14, 12, 13)) == (-9, -10, -12, -15, -13, -14) |
| Prompt: Write a function to perform the adjacent element concatenation in the given tuples. Assesments: assert concatenate_elements((DSP , IS , BEST , FOR , ALL , UTS)) == ('DSP IS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL UTS'), assert concatenate_elements((RES , IS , BEST , FOR , ALL , QESR)) == ('RES IS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL QESR'), assert concatenate_elements((MSAM, IS , BEST , FOR , ALL , SKD)) == ('MSAMIS ', 'IS BEST ', 'BEST FOR ', 'FOR ALL ', 'ALL SKD')Prompt: Write function adjacent element concatenation tuplesAssesments: assert concatenate_elements(DSP IS BEST ALL UTS)'DSP IS BEST FOR ALL UTS assert concatenate_elements(""RES "" ""IS ""BEST ""ALL ""QESR"")'RES IS BEST FOR ALL QESR assert concatenate_elements(MSAM, IS BEST FOR ALL SKD)'MSAMIS BEST 'BEST FOR ALL SKD'",0.0,0.14730949960964543 |
| "Prompt: Write a function to count the longest repeating subsequences such that the two subsequences don’t have same string characters at same positions. Assesments: assert find_longest_repeating_subseq(""AABEBCDD"") == 3, assert find_longest_repeating_subseq(""aabb"") == 2, assert find_longest_repeating_subseq(""aab"") == 1",81,0.034,43,1.8837209302325582,"Prompt: Write function count longest subsequences same string characters positionsAssesments: assert find_longest_repeating_subseq(""AABEBCDD"") 3""aabb"") == 2""aab"") 1",0.0,0.3362297333359368 |
| "Prompt: Write a function to check the given decimal with a precision of 2 by using regex. Assesments: assert is_decimal('123.11') == True, assert is_decimal('0.21') == True, assert is_decimal('123.1214') == False",57,0.034,34,1.6764705882352942,Prompt: Write function check decimal precision 2 regex.Assesments: assert_decimal('123.11') True'0.21')'123.1214') False,0.0,0.16679837342157686 |
| "Prompt: Write a function to delete the smallest element from the given heap and then insert a new item. Assesments: assert heap_replace( [25, 44, 68, 21, 39, 23, 89],21)==[21, 25, 23, 44, 39, 68, 89], assert heap_replace([25, 44, 68, 21, 39, 23, 89],110)== [23, 25, 68, 44, 39, 110, 89], assert heap_replace([25, 44, 68, 21, 39, 23, 89],500)==[23, 25, 68, 44, 39, 500, 89]",167,0.035,77,2.168831168831169,"Prompt: Write function delete smallest element heap insert new itemAssesments: assert heap_replace [25, 44, 68 21, 39 23, 89 25 44 89 44 68 25 68 44 39 89 44 68 21, 39 89],500 25 68 44 89",0.0,0.5693131385826601 |
| "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. Assesments: assert is_allowed_specific_char(""ABCDEFabcdef123450"") == True, assert is_allowed_specific_char(""*&%@#!}{"") == False, assert is_allowed_specific_char(""HELLOhowareyou98765"") == True",85,0.039,49,1.7346938775510203,"Prompt: Write function check string characters a-z 0-9) regexAssesments: assert_allowed_specific_char(""ABCDEFabcdef123450"") == True(""*&%@#!}{"") False(""HELLOhowareyou98765"") True",0.0,0.21439709385013442 |
| "Prompt: Write a python function to count numbers whose oth and nth bits are set. Assesments: assert count_Num(2) == 1, assert count_Num(3) == 2, assert count_Num(1) == 1",50,0.034,26,1.9230769230769231,Prompt: Write python function count numbers oth nth bits setAssesments: assert_Num(2) 1 2 1,0.0,0.3684040560614868 |
| "Prompt: Write a python function to find the sum of fourth power of n natural numbers. Assesments: assert fourth_Power_Sum(2) == 17, assert fourth_Power_Sum(4) == 354, assert fourth_Power_Sum(6) == 2275",61,0.034,30,2.033333333333333,"Prompt: Write python function find sum fourth power n numbersAssesments: assert_Sum(2) == 17, 354 2275",0.0,0.4585409086668531 |
| "Prompt: Write a function to perform the concatenation of two string tuples. Assesments: assert concatenate_strings((""Manjeet"", ""Nikhil"", ""Akshat""), ("" Singh"", "" Meherwal"", "" Garg"")) == ('Manjeet Singh', 'Nikhil Meherwal', 'Akshat Garg'), assert concatenate_strings((""Shaik"", ""Ayesha"", ""Sanya""), ("" Dawood"", "" Begum"", "" Singh"")) == ('Shaik Dawood', 'Ayesha Begum', 'Sanya Singh'), assert concatenate_strings((""Harpreet"", ""Priyanka"", ""Muskan""), (""Kour"", "" Agarwal"", ""Sethi"")) == ('HarpreetKour', 'Priyanka Agarwal', 'MuskanSethi')",163,0.034,88,1.8522727272727273,"Prompt: Write function concatenation string tuplesAssesments: assert concatenate_strings""Manjeet"", Meherwal"", Garg"")'Manjeet Singh 'Nikhil Meherwal 'Akshat Garg assert_strings Singh) Dawood Begum Singh assert_stringsHarpreet, (Kour, Agarwal, Sethi)'HarpreetKour 'Priyanka Agarwal 'MuskanSethi' |
| Prompt: Write a function to convert radians to degrees. Assesments: assert degree_radian(90)==5156.620156177409, assert degree_radian(60)==3437.746770784939, assert degree_radian(120)==6875.493541569878 |
| Prompt: Write a function to decode a run-length encoded given list. Assesments: assert decode_list([[2, 1], 2, 3, [2, 4], 5,1])==[1,1,2,3,4,4,5,1], assert 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'], assert decode_list(['p', 'y', 't', 'h', 'o', 'n'])==['p', 'y', 't', 'h', 'o', 'n']Prompt: Write function decode-length encoded listAssesments: assert decode_list([2 1 3 4 5,1][1,1,2,3,4,4,5,1] assert decode_list(['a 'u 't 'o 'm 'c 'l 'y' 'l 'y assert decode_list(['p' 'y 't 'h 'o' 'n']'p' 'y 'h 'o 'n'",0.0,0.33118570686041005 |
| "Prompt: Write a function to check if a nested list is a subset of another nested list. Assesments: assert 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, assert check_subset_list([[2, 3, 1], [4, 5], [6, 8]],[[4, 5], [6, 8]])==True, assert check_subset_list([['a', 'b'], ['e'], ['c', 'd']],[['g']])==False",187,0.035,93,2.010752688172043,"Prompt: Write function check nested listAssesments: assert check_subset_list( 2 3 4 5 6 7 8 9 10 11 12 13, 14 18 23, 25 45 11 19, 24 28 5 8 18 15 assert check_subset_list 3 1 5 assert check_subset_list('a 'b'e'c 'd'g",0.0,0.4400807730620032 |
| "Prompt: Write a python function to find the first repeated character in a given string. Assesments: assert first_Repeated_Char(""Google"") == ""o"", assert first_Repeated_Char(""data"") == ""a"", assert first_Repeated_Char(""python"") == '\0'",60,0.034,27,2.2222222222222223,"Prompt: Write python function find first character stringAssesments: assert first_Char == ""o"", ""a"", '\0'",0.0,0.6129614080915509 |
| "Prompt: Write a python function to find the minimum operations required to make two numbers equal. Assesments: assert min_Operations(2,4) == 1, assert min_Operations(4,10) == 4, assert min_Operations(1,4) == 3",60,0.033,35,1.7142857142857142,"Prompt: Write python function minimum operations numbers equalAssesments: assert_Operations(2,4) 1,10) 4(1,4) 3",0.0,0.1977130062772379 |
| "Prompt: Write a function to extract maximum and minimum k elements in the given tuple. Assesments: assert extract_min_max((5, 20, 3, 7, 6, 8), 2) == (3, 5, 8, 20), assert extract_min_max((4, 5, 6, 1, 2, 7), 3) == (1, 2, 4, 5, 6, 7), assert extract_min_max((2, 3, 4, 8, 9, 11, 7), 4) == (2, 3, 4, 7, 8, 9, 11)",153,0.046,75,2.04,"Prompt: Write function extract maximum elements tupleAssesments: assert extract_min_max((5, 20 3 7 6 8) (3 5 8 5 6 1 2 7) 4 5 6 7), 3 4 8 9 11 7) 3 4 7",0.0,0.4639910439406661 |
| "Prompt: Write a function to replace maximum n occurrences of spaces, commas, or dots with a colon. Assesments: assert replace_max_specialchar('Python language, Programming language.',2)==('Python:language: Programming language.'), assert replace_max_specialchar('a b c,d e f',3)==('a:b:c:d e f'), assert replace_max_specialchar('ram reshma,ram rahim',1)==('ram:reshma,ram rahim')",97,0.034,43,2.255813953488372,"Prompt: Write function replace n spaces commas dots colonAssesments: assert replace_max_specialchar('Python language Programming language replace_max_specialchar( b c,d e f replace_specialchar('ram reshma rahim",0.0,0.6404233300138636 |
| "Prompt: Write a python function to find the first even number in a given list of numbers. Assesments: assert first_even ([1, 3, 5, 7, 4, 1, 6, 8]) == 4, assert first_even([2, 3, 4]) == 2, assert first_even([5, 6, 7]) == 6",85,0.034,46,1.8478260869565217,"Prompt: Write python function find first even listAssesments: assert first_even[1 3 5 7 6 8] == 4[2, 3 4][5 6 7]",0.0,0.30688497061293024 |
| "Prompt: Write a function to check if all the elements in tuple have same data type or not. Assesments: assert check_type((5, 6, 7, 3, 5, 6) ) == True, assert check_type((1, 2, ""4"") ) == False, assert check_type((3, 2, 1, 4, 5) ) == True",86,0.034,44,1.9545454545454546,Prompt: Write function check elements tuple data typeAssesments: assert check_type((5 6 7 6) True((1 2 False assert((3 2 1 4 5) True,0.0,0.39413021906724677 |
| "Prompt: Write a function to check for majority element in the given sorted array. Assesments: assert is_majority([1, 2, 3, 3, 3, 3, 10], 7, 3) == True, assert is_majority([1, 1, 2, 4, 4, 4, 6, 6], 8, 4) == False, assert is_majority([1, 1, 1, 2, 2], 5, 1) == True",118,0.034,60,1.9666666666666666,"Prompt: Write function check majority arrayAssesments: assert_majority([1, 2 3 3 10 7, 3) True[1 2 4 4 6 8, 4) False([1 2 5, 1) True",0.0,0.4040395559287246 |
| "Prompt: Write a python function to count set bits of a given number. Assesments: assert count_Set_Bits(2) == 1, assert count_Set_Bits(4) == 1, assert count_Set_Bits(6) == 2",54,0.034,27,2.0,Prompt: Write python function count bits given numberAssesments: assert count_Set_Bits(2) 1 1 2,0.0,0.43129023229778896 |
| "Prompt: Write a python function to find the minimum element in a sorted and rotated array. Assesments: assert find_Min([1,2,3,4,5],0,4) == 1, assert find_Min([4,6,8],0,2) == 4, assert find_Min([2,3,5,7,9],0,4) == 2",83,0.034,51,1.6274509803921569,"Prompt: Write python function minimum sorted arrayAssesments: assert[1,2,3,4,5,0,4) 1,6,8 4[2,3,5,7,9,0,4)",0.0,0.12672384934942346 |
| "Prompt: Write a python function to remove the characters which have odd index values of a given string. Assesments: assert odd_values_string('abcdef') == 'ace', assert odd_values_string('python') == 'pto', assert odd_values_string('data') == 'dt'",57,0.034,31,1.8387096774193548,Prompt: Write python function remove characters odd index values stringAssesments: assert odd_values_string'abcdef 'ace''python 'pto' 'dt',0.0,0.2994321208345746 |
| "Prompt: Write a function to find minimum of three numbers. Assesments: assert min_of_three(10,20,0)==0, assert min_of_three(19,15,18)==15, assert min_of_three(-10,-20,-30)==-30",55,0.033,29,1.896551724137931,"Prompt: Write function find three numbersAssesments: assert_three(10,20,0)==0,15(-10,-20,-30",0.0,0.3467191677041412 |
| "Prompt: Write a python function to check whether all the bits are unset in the given range or not. Assesments: assert all_Bits_Set_In_The_Given_Range(4,1,2) == True, assert all_Bits_Set_In_The_Given_Range(17,2,4) == True, assert all_Bits_Set_In_The_Given_Range(39,4,6) == False",90,0.035,52,1.7307692307692308,"Prompt: Write python function check bits unset rangeAssesments: assert all_Bits_Set_In_Given_Range(4,1,2) True_Bits_Set_Range(17,2,4)_Set(39,4,6) False",0.0,0.21118861547073137 |
| "Prompt: Write a function to re-arrange the elements of the given array so that all negative elements appear before positive ones. Assesments: assert re_arrange_array([-1, 2, -3, 4, 5, 6, -7, 8, 9], 9) == [-1, -3, -7, 4, 5, 6, 2, 8, 9], assert re_arrange_array([12, -14, -26, 13, 15], 5) == [-14, -26, 12, 13, 15], assert re_arrange_array([10, 24, 36, -42, -39, -78, 85], 7) == [-42, -39, -78, 10, 24, 36, 85]",182,0.035,86,2.116279069767442,"Prompt: Write function re-arrange array negative before positiveAssesments: assert re_arrange_array([-1 2 -3 4 5 6 -7 8 9] 9) -3 -7([12 -14 -26 13, 15]([10 24 36 -42 -39 -78 85] 7) [-42 -39 -78 24 85",0.0,0.5263507312596413 |
| "Prompt: Write a function to replace blank spaces with any character in a string. Assesments: assert replace_blank(""hello people"",'@')==(""hello@people""), assert replace_blank(""python program language"",'$')==(python$program$language), assert replace_blank(blank space,-)==(blank-space)Prompt: Write function replace blank spaces character stringAssesments: assert replace_blank(hello people,)==python programblank space,-)==-space) |
| Prompt: Write a function to find the maximum sum in the given right triangle of numbers. Assesments: assert max_sum([[1], [2,1], [3,3,2]], 3) == 6, assert max_sum([[1], [1, 2], [4, 1, 12]], 3) == 15 , assert max_sum([[2], [3,2], [13,23,12]], 3) == 28Prompt: Write function find maximum sum right triangleAssesments: assert max_sum(,1] [3,3,2] 6 max_sum 2 1 12]] 15 max_sum [3,2] [13,23,12]] 28 |
| Prompt: Write a function to get the n largest items from a dataset. Assesments: assert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],2)==[100,90], assert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],5)==[100,90,80,70,60], assert larg_nnum([10, 20, 50, 70, 90, 20, 50, 40, 60, 80, 100],3)==[100,90,80]Prompt: Write function get largest items datasetAssesments: assert larg_nnum([10, 20, 50 70 90 60 80 100,2)==[100,90] assert larg_nnum( 50 70 100,5)==[100,90,80,70,60 assert larg(,3)==[100,90,80] |
| Prompt: Write a function to find the lateral surface area of a cylinder. Assesments: assert lateralsuface_cylinder(10,5)==314.15000000000003, assert lateralsuface_cylinder(4,5)==125.66000000000001, assert lateralsuface_cylinder(4,10)==251.32000000000002Prompt: Write function lateral cylinderAssesments: assert,5)==314.15000000000003(4,5)==125.66000000000001,10)==251.32000000000002 |
| Prompt: Write a function to find the volume of a cube. Assesments: assert volume_cube(3)==27, assert volume_cube(2)==8, assert volume_cube(5)==125 |
| Prompt: Write a python function to set all even bits of a given number. Assesments: assert even_bit_set_number(10) == 10, assert even_bit_set_number(20) == 30, assert even_bit_set_number(30) == 30 |
| Prompt: Write a python function to count the maximum number of equilateral triangles that can be formed within a given equilateral triangle. Assesments: assert No_of_Triangle(4,2) == 7, assert No_of_Triangle(4,3) == 3, assert No_of_Triangle(1,3) == -1Prompt: Write python function count maximum equilateral trianglesAssesments: assert No_Triangle(4,2) == 7,3) == 3,3) == -1 |
| Prompt: Write a function to check the occurrences of records which occur similar times in the given tuples. Assesments: assert check_occurences([(3, 1), (1, 3), (2, 5), (5, 2), (6, 3)] ) == {(1, 3): 2, (2, 5): 2, (3, 6): 1}, assert check_occurences([(4, 2), (2, 4), (3, 6), (6, 3), (7, 4)] ) == {(2, 4): 2, (3, 6): 2, (4, 7): 1}, assert check_occurences([(13, 2), (11, 23), (12, 25), (25, 12), (16, 23)] ) == {(2, 13): 1, (11, 23): 1, (12, 25): 2, (16, 23): 1}Prompt: Write function check tuplesAssesments: assert check_occurences, 1) (1, 3) (2, 5) (5, 2) (6, 3), 3) (2, 5) (3, 6), 2) (2, 4) (3, 6) (6, 3) (7, 4) (4, 7)(13, 2) (11, (12, (25, (16, 23), (11, (12, (16, |
| Prompt: Write a python function to count number of non-empty substrings of a given string. Assesments: assert number_of_substrings(abc) == 6, assert number_of_substrings(abcd) == 10, assert number_of_substrings(abcde) == 15Prompt: Write python function count non-empty substrings stringAssesments: assertabc) == 6abcd) 10abcde) 15 |
| 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. Assesments: assert get_total_number_of_sequences(10, 4) == 4, assert get_total_number_of_sequences(5, 2) == 6, assert get_total_number_of_sequences(16, 3) == 84Prompt: Write function find sequences length n next element greater equal previous less equal mAssesments: assert get_total_number_sequences(10, 4) == 4, 2) == 6(16, 3) == 84 |
| Prompt: Write a function to replace the last element of the list with another list. Assesments: assert replace_list([1, 3, 5, 7, 9, 10],[2, 4, 6, 8])==[1, 3, 5, 7, 9, 2, 4, 6, 8], assert replace_list([1,2,3,4,5],[5,6,7,8])==[1,2,3,4,5,6,7,8], assert replace_list([red,blue,green],[yellow])==[red,blue,yellow]Prompt: Write function replace last element anotherAssesments: assert replace_list([1, 3 5 7 9 10, 4 6 8 3 5 7 6 8 replace_list([1,2,3,4,5[5,6,7,8] replace([yellow |
| Prompt: Write a function to generate a 3d array having each element as '*'. Assesments: assert array_3d(6,4,3)==[[['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']]], assert array_3d(5,3,4)==[[['*', '*', '*', '*', '*'], ['*', '*', '*', '*','*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'],['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']]], assert array_3d(1,2,3)==[[['*'],['*']],[['*'],['*']],[['*'],['*']]]Prompt: Write function 3d array element ''Assesments: assert array_3d(6,4'*'*'*' '**'**'*' '* '****'*****'****'*' '* '***'*' '* '* '** '*'*' '*' '*' '* '* '*''*' '*' '*' '*' '*' '*''*' '*' '*' '** '* assert array_3d(5,3,4'*', '*' '*' '*' '*''*' '*' '*' '*'*'*' '*' '*' '* '*'*' '*' '*' '* '*''*' '*' '*' '*' '*' ['*' '*' '*' '*' '*'*' '*' '*' '*' '*' ['*', '*' '*' '*'*' ['*', '*' '*' [['*', '*' '*'*' '* '* '*'* '* '* assert array_3d(1,2,3)==['*'],['*']]'*'*** |
| Prompt: Write a function to count total characters in a string. Assesments: assert count_charac(python programming)==18, assert count_charac(language)==8, assert count_charac(words)==5Prompt: Write function count characters stringAssesments: assert count_characpython programming)==18words)==5 |
| Prompt: Write a function to sort the given list based on the occurrence of first element of tuples. Assesments: assert sort_on_occurence([(1, 'Jake'), (2, 'Bob'), (1, 'Cara')]) == [(1, 'Jake', 'Cara', 2), (2, 'Bob', 1)], assert sort_on_occurence([('b', 'ball'), ('a', 'arm'), ('b', 'b'), ('a', 'ant')]) == [('b', 'ball', 'b', 2), ('a', 'arm', 'ant', 2)], assert sort_on_occurence([(2, 'Mark'), (3, 'Maze'), (2, 'Sara')]) == [(2, 'Mark', 'Sara', 2), (3, 'Maze', 1)]Prompt: Write function sort list first element tuplesAssesments: assert sort_on_occurence([(1 'Jake (2 'Bob 'Cara' 'Jake (2 'Bob assert sort('b' 'ball'a' 'arm 'ant' 'arm sort_occurence[(2, 'Mark (3, 'Maze (2 'Sara' [(2, 'Mark 'Sara' 2) (3 'Maze' 1) |
| Prompt: Write a python function to find the next perfect square greater than a given number. Assesments: assert next_Perfect_Square(35) == 36, assert next_Perfect_Square(6) == 9, assert next_Perfect_Square(9) == 16 |
| Prompt: Write a function to find the maximum sum of bi-tonic sub-sequence for the given array. Assesments: assert max_sum([1, 15, 51, 45, 33, 100, 12, 18, 9], 9) == 194, assert max_sum([80, 60, 30, 40, 20, 10], 6) == 210, assert max_sum([2, 3 ,14, 16, 21, 23, 29, 30], 8) == 138Prompt: Write function find maximum bi-tonic sub-sequence arrayAssesments: assert max_sum 15 51 45 33 100 12 18 9 194 60 30 40 20 10 210 16 21, 30 8) 138 |
| Prompt: Write a function for computing square roots using the babylonian method. Assesments: assert babylonian_squareroot(10)==3.162277660168379, assert babylonian_squareroot(2)==1.414213562373095, assert babylonian_squareroot(9)==3.0 |
| Prompt: Write a function to find the longest palindromic subsequence in the given string. Assesments: assert lps(TENS FOR TENS) == 5 , assert lps(CARDIO FOR CARDS) == 7, assert lps(PART OF THE JOURNEY IS PART) == 9Prompt: Write function find longest palindromic subsequence stringAssesments: assertTENS TENS) 5CARDIO CARDS) 7 JOURNEY PART) 9 |
| Prompt: Write a function to calculate the harmonic sum of n-1. Assesments: assert harmonic_sum(7) == 2.5928571428571425, assert harmonic_sum(4) == 2.083333333333333, assert harmonic_sum(19) == 3.547739657143682 |
| Prompt: Write a function to find the intersection of two arrays using lambda function. Assesments: assert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[1, 2, 4, 8, 9])==[1, 2, 8, 9], assert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[3,5,7,9])==[3,5,7,9], assert intersection_array([1, 2, 3, 5, 7, 8, 9, 10],[10,20,30,40])==[10]Prompt: Write function intersection arrays lambdaAssesments: assert intersection_array([1, 2, 3, 5, 7, 8 9 10 8 9 3 5 7 8 9 10,7,9] 2 3 5 7 8 9 10],20,30,40] |
| Prompt: Write a python function to count the occcurences of an element in a tuple. Assesments: assert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),4) == 0, assert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),10) == 3, assert count_X((10, 8, 5, 2, 10, 15, 10, 8, 5, 8, 8, 2),8) == 4Prompt: Write python function count occcurences element tupleAssesments: assert count_X((10, 8, 5, 2, 10, 15 2),4) 0 count_X((10, 8 5 2),10) == 3 count_X((10 8 5 2),8) 4 |
| Prompt: Write a function to insert an element before each element of a list. Assesments: assert insert_element(['Red', 'Green', 'Black'] ,'c')==['c', 'Red', 'c', 'Green', 'c', 'Black'] , assert insert_element(['python', 'java'] ,'program')==['program', 'python', 'program', 'java'] , assert insert_element(['happy', 'sad'] ,'laugh')==['laugh', 'happy', 'laugh', 'sad']Prompt: Write function insert element before each listAssesments: assert insert_element(['Red' 'Green' 'Black']'c')== assert insert_element(['python', 'java']'program')== assert insert_element(['happy', 'sad']'laugh')==['laugh'']",0.0,0.2650149188594307 |
| "Prompt: Write a python function to convert complex numbers to polar coordinates. Assesments: assert convert(1) == (1.0, 0.0), assert convert(4) == (4.0,0.0), assert convert(5) == (5.0,0.0)",64,0.036,30,2.1333333333333333,Prompt: Write python function convert numbers polar coordinatesAssesments: assert convert(1) (1.0 (4.0 (5.0,0.0,0.5402929377740461 |
| "Prompt: Write a python function to count integers from a given list. Assesments: assert count_integer([1,2,'abc',1.2]) == 2, assert count_integer([1,2,3]) == 3, assert count_integer([1,1.2,4,5.1]) == 2",69,0.035,39,1.7692307692307692,"Prompt: Write python function count integers listAssesments: assert count_integer 2[1,2,3] 3[1,1.2,4,5.1]",0.0,0.24263170358888234 |
| "Prompt: Write a function to find all words starting with 'a' or 'e' in a given string. Assesments: assert words_ae(""python programe"")==['ame'], assert words_ae(""python programe language"")==['ame','anguage'], assert words_ae(""assert statement"")==['assert', 'atement']",68,0.034,37,1.837837837837838,"Prompt: Write function find words starting 'a' 'e' stringAssesments: assert words_ae""python['ame']'ame''anguage']['assert' 'atement']",0.0,0.29871937428612494 |
| "Prompt: Write a function to choose specified number of colours from three different colours and generate all the combinations with repetitions. Assesments: assert combinations_colors( [""Red"",""Green"",""Blue""],1)==[('Red',), ('Green',), ('Blue',)], assert combinations_colors( [""Red"",""Green"",""Blue""],2)==[('Red', 'Red'), ('Red', 'Green'), ('Red', 'Blue'), ('Green', 'Green'), ('Green', 'Blue'), ('Blue', 'Blue')], assert 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')]",208,0.035,108,1.9259259259259258,"Prompt: Write function choose colours three generate combinations repetitionsAssesments: assert combinations_colors( [""Red"",""Green"",""Blue""],1)==[('Red' ('Green''Blue',2)==[('Red', 'Red'), ( 'Green'), 'Blue'), ('Green', 'Blue assert combinations_colors(,3)==[('Red', 'Red', 'Red'), ( 'Green 'Blue'), 'Green', 'Green 'Blue 'Blue'Green', 'Green', 'Green 'Blue'), 'Blue', 'Blue 'Blue)]",0.0,0.37073317369986825 |
| "Prompt: Write a python function to count the number of prime numbers less than a given non-negative number. Assesments: assert count_Primes_nums(5) == 2, assert count_Primes_nums(10) == 4, assert count_Primes_nums(100) == 25",60,0.034,31,1.935483870967742,Prompt: Write python function count prime numbers less non-negative numberAssesments: assert_nums(5) 2) 4(100) 25,0.0,0.3785469877125033 |
| "Prompt: Write a function to swap two numbers. Assesments: assert swap_numbers(10,20)==(20,10), assert swap_numbers(15,17)==(17,15), assert swap_numbers(100,200)==(200,100)",53,0.036,27,1.962962962962963,"Prompt: Write function swap numbersAssesments: assert swap_numbers(10,20)==(15,17)==(100,200",0.0,0.40101170299882866 |
| "Prompt: Write a function to find number of odd elements in the given list using lambda function. Assesments: assert count_odd([1, 2, 3, 5, 7, 8, 10])==4, assert count_odd([10,15,14,13,-18,12,-20])==2, assert count_odd([1, 2, 4, 8, 9])==2",94,0.035,45,2.088888888888889,"Prompt: Write function find odd elements list lambdaAssesments: assert count_odd( 2 3 5 7 8 10])==4,15][1 2 4 8 9",0.0,0.5039587026152937 |
| "Prompt: Write a function to maximize the given two tuples. Assesments: assert 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)), assert 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)), assert 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))",244,0.036,123,1.983739837398374,"Prompt: Write function maximize tuplesAssesments: assert maximize, 3) (4, 5) (2, 9) (1, 10, 7) (3, 9) (1, (7, (4,, 4) (5, 6) (3, (2, 11, 8) (4, (2, (8,, 5) (6, 7) (4, (3, 12, 9) (5, (3, 3) (9,, (6, (4, 12",0.0,0.4179972194348307 |
| "Prompt: Write a function to find the nth newman–shanks–williams prime number. Assesments: assert newman_prime(3) == 7 , assert newman_prime(4) == 17, assert newman_prime(5) == 41",56,0.034,25,2.24,"Prompt: Write function find prime numberAssesments: assert newman_prime(3) 7 17, 41",0.0,0.6274951021550519 |
| "Prompt: Write a function to perform mathematical division operation across the given tuples. Assesments: assert division_elements((10, 4, 6, 9),(5, 2, 3, 3)) == (2, 2, 2, 3), assert division_elements((12, 6, 8, 16),(6, 3, 4, 4)) == (2, 2, 2, 4), assert division_elements((20, 14, 36, 18),(5, 7, 6, 9)) == (4, 2, 6, 2)",136,0.045,72,1.8888888888888888,"Prompt: Write function division tuplesAssesments: assert division_elements((10 4 6 9) 2 3 3)((12, 6 8 16),(6, 3 4 4)(20, 14 36 18),(5, 7 6 9) (4 2 2)",0.0,0.34045464440090795 |
| "Prompt: Write a function to split a given list into two parts where the length of the first part of the list is given. Assesments: assert split_two_parts([1,1,2,3,4,4,5,1],3)==([1, 1, 2], [3, 4, 4, 5, 1]), assert split_two_parts(['a', 'b', 'c', 'd'],2)==(['a', 'b'], ['c', 'd']), assert split_two_parts(['p', 'y', 't', 'h', 'o', 'n'],4)==(['p', 'y', 't', 'h'], ['o', 'n'])",149,0.034,83,1.7951807228915662,"Prompt: Write function split list length firstAssesments: assert split_two_parts([1,1,2,3,4,4,5,1],3)==[1 2 [3 4 5 1 split_parts(['a 'b 'c 'd'],2)==['a 'd split_parts(['p 'y 't 'h 'o 'n'],4)==['p |
| Prompt: Write a function to merge two dictionaries. Assesments: assert merge_dict({'a': 100, 'b': 200},{'x': 300, 'y': 200})=={'x': 300, 'y': 200, 'a': 100, 'b': 200}, assert 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}, assert merge_dict({'a':10,'b':20},{'x':30,'y':40})=={'x':30,'y':40,'a':10,'b':20}Prompt: Write function merge dictionariesAssesments: assert merge_dict('a' 100 'b' 200'x' 300 'y' 200'x 300 'y 200 100 'b' 200 assert merge_dict'a':900'b''d':900 assert merge_dict{'a':10,'b':20'x':30'y':40 |
| Prompt: Write a function to calculate a dog's age in dog's years. Assesments: assert dog_age(12)==61, assert dog_age(15)==73, assert dog_age(24)==109 |
| Prompt: Write a function to split a list for every nth element. Assesments: assert 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']] , assert 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]] , assert list_split(['python','java','C','C++','DBMS','SQL'],2)==[['python', 'C', 'DBMS'], ['java', 'C++', 'SQL']]Prompt: Write function split list nth elementAssesments: assert list_split('a 'k 'l 'm 'n,3)==['a 'd'b 'e 'h 'k 'n'c 'f 'i 'l assert 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]] assert list_split('python'DBMS'],2)=='python |
| Prompt: Write a function to find the lateral surface area of a cube. Assesments: assert lateralsurface_cube(5)==100, assert lateralsurface_cube(9)==324, assert lateralsurface_cube(10)==400 |
| Prompt: Write a python function to find the sum of squares of first n odd natural numbers. Assesments: assert square_Sum(2) == 10, assert square_Sum(3) == 35, assert square_Sum(4) == 84 |
| Prompt: Write a function to find the n'th star number. Assesments: assert find_star_num(3) == 37, assert find_star_num(4) == 73, assert find_star_num(5) == 121",49,0.045,24,2.0416666666666665,Prompt: Write function find n'th star numberAssesments: assert_num(3) 37 73 121,0.0,0.4653535777591192 |
| ,44,0.034,23,1.9130434782608696,Prompt: Write function find ascii value characterAssesments: assert ascii_value'A)==65'R'S)==83,0.0,0.3602015113350126 |
| "Prompt: Write a python function to find the sum of even numbers at even positions. Assesments: assert sum_even_and_even_index([5, 6, 12, 1, 18, 8],6) == 30, assert sum_even_and_even_index([3, 20, 17, 9, 2, 10, 18, 13, 6, 18],10) == 26, assert sum_even_and_even_index([5, 6, 12, 1],4) == 12",116,0.034,57,2.0350877192982457,"Prompt: Write python function even numbers positionsAssesments: assert sum([5, 6 12 18 8,6) 30[3, 20 17, 9 18 26,[5 6 12 1,4) 12",0.0,0.4599751547915409 |
| "Prompt: Write a python function to find the sum of fifth power of first n even natural numbers. Assesments: assert even_Power_Sum(2) == 1056, assert even_Power_Sum(3) == 8832, assert even_Power_Sum(1) == 32",64,0.039,31,2.064516129032258,Prompt: Write python function find sum fifth power first even numbersAssesments: assert even_Sum(2) 1056 8832 32,0.0,0.4840334768830746 |
| "Prompt: Write a function to perfom the rear element extraction from list of tuples records. Assesments: assert rear_extract([(1, 'Rash', 21), (2, 'Varsha', 20), (3, 'Kil', 19)]) == [21, 20, 19], assert rear_extract([(1, 'Sai', 36), (2, 'Ayesha', 25), (3, 'Salman', 45)]) == [36, 25, 45], assert rear_extract([(1, 'Sudeep', 14), (2, 'Vandana', 36), (3, 'Dawood', 56)]) == [14, 36, 56]",152,0.035,72,2.111111111111111,"Prompt: Write function rear element extraction tuples recordsAssesments: assert rear_extract( 'Rash 'Varsha (3 'Kil 19 [21 20 19 'Sai 'Ayesha 'Salman 45 [36 25 45 'Sudeep 'Vandana (3 'Dawood [14, 36 56 |
| Prompt: Write a function to substract the contents of one tuple with corresponding index of other tuple. Assesments: assert substract_elements((10, 4, 5), (2, 5, 18)) == (8, -1, -13), assert substract_elements((11, 2, 3), (24, 45 ,16)) == (-13, -43, -13), assert substract_elements((7, 18, 9), (10, 11, 12)) == (-3, 7, -3)Prompt: Write function substract tupleAssesments: assert substract((10 4 5) 18 (8, -1 -13)(11 2 3) (24 (-13 -43 -13)(7 18 9) (10 12 (-3 7 -3) |
| Prompt: Write a python function to find sum of even index binomial coefficients. Assesments: assert even_binomial_Coeff_Sum(4) == 8, assert even_binomial_Coeff_Sum(6) == 32, assert even_binomial_Coeff_Sum(2) == 2 |
| Prompt: Write a python function to find the position of the last removed element from the given array. Assesments: assert get_Position([2,5,4],3,2) == 2, assert get_Position([4,3],2,2) == 2, assert get_Position([1,2,3,4],4,1) == 4Prompt: Write python function find position last element arrayAssesments: assert_Position([2,5,4,3,2)[4,3],2([1,2,3,4],4,1) |
| Prompt: Write a function to find the volume of a cylinder. Assesments: assert volume_cylinder(10,5)==1570.7500000000002, assert volume_cylinder(4,5)==251.32000000000002, assert volume_cylinder(4,10)==502.64000000000004Prompt: Write function find volume cylinderAssesments:,5)==1570.7500000000002(4,5,10)==502.64000000000004 |
| Prompt: Write a function to filter a dictionary based on values. Assesments: assert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},170)=={'Cierra Vega': 175, 'Alden Cantrell': 180, 'Pierre Cox': 190}, assert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},180)=={ 'Alden Cantrell': 180, 'Pierre Cox': 190}, assert dict_filter({'Cierra Vega': 175, 'Alden Cantrell': 180, 'Kierra Gentry': 165, 'Pierre Cox': 190},190)=={ 'Pierre Cox': 190}Prompt: Write function filter dictionary valuesAssesments: assert dict_filter('Cierra Vega 175 Cantrell 180 'Kierra Gentry 165 Cox 190,170 Vega 175 Cantrell 180 Cox 190 Vega 175 Cantrell 180 Gentry 165 Cox 190 Cantrell 180 Cox 190'Cierra Vega 175 180 Gentry 165 Cox 190 Cox 190",0.0,0.5480788453080644 |
| "Prompt: Write a function to find the element count that occurs before the record in the given tuple. Assesments: assert count_first_elements((1, 5, 7, (4, 6), 10) ) == 3, assert count_first_elements((2, 9, (5, 7), 11) ) == 2, assert count_first_elements((11, 15, 5, 8, (2, 3), 8) ) == 4",104,0.037,57,1.8245614035087718,Prompt: Write function element count before record tupleAssesments: assert_first_elements((1 5 7 6) 10) 3((2 9 7) 11)(11 15 5 8 (2 3) 8) 4,0.0,0.2878656198290295 |
| "Prompt: Write a function to find the nth decagonal number. Assesments: assert is_num_decagonal(3) == 27, assert is_num_decagonal(7) == 175, assert is_num_decagonal(10) == 370",52,0.034,25,2.08,"Prompt: Write function find nth decagonal numberAssesments: assert == 27,(7) 175) 370",0.0,0.4966918555835433 |
| "Prompt: Write a function to search an element in the given array by using sequential search. Assesments: assert sequential_search([11,23,58,31,56,77,43,12,65,19],31) == (True, 3), assert sequential_search([12, 32, 45, 62, 35, 47, 44, 61],61) == (True, 7), assert sequential_search([9, 10, 17, 19, 22, 39, 48, 56],48) == (True, 6)",127,0.035,66,1.9242424242424243,"Prompt: Write function search element array sequential searchAssesments: assert sequential_search,23,58,77,65,19 3) 32 45 62 35 47 44 61 7) 10 17, 19, 22, 39 48 56 6)",0.0,0.369356876913552 |
| "Prompt: Write a python function to check if the elements of a given list are unique or not. Assesments: assert all_unique([1,2,3]) == True, assert all_unique([1,2,1,2]) == False, assert all_unique([1,2,3,4,5]) == True",68,0.038,37,1.837837837837838,"Prompt: Write python function check elements list uniqueAssesments: assert all_unique([1,2,3]) True False([1,2,3,4,5]) True",0.0,0.29871937428612494 |
| "Prompt: Write a function to substaract two lists using map and lambda function. Assesments: assert sub_list([1, 2, 3],[4,5,6])==[-3,-3,-3], assert sub_list([1,2],[3,4])==[-2,-2], assert sub_list([90,120],[50,70])==[40,50]",83,0.034,43,1.930232558139535,"Prompt: Write function substaract lists map lambdaAssesments: assert sub_list 2 3,5,6]-3]][-2,-2][90,120,70][40,50]",0.0,0.3742539329206777 |
| "Prompt: Write a python function to check whether the frequency of each digit is less than or equal to the digit itself. Assesments: assert validate(1234) == True, assert validate(51241) == False, assert validate(321) == True",53,0.034,31,1.7096774193548387,Prompt: Write python function check frequency digit equalAssesments: assert validate(1234) True validate(51241) False validate(321) True,0.0,0.1939456316640033 |
| "Prompt: Write a function to check whether all items of a list are equal to a given string. Assesments: assert check_element([""green"", ""orange"", ""black"", ""white""],'blue')==False, assert check_element([1,2,3,4],7)==False, assert check_element([""green"", ""green"", ""green"", ""green""],'green')==True",81,0.037,44,1.8409090909090908,"Prompt: Write function check items list equal stringAssesments: assert check_element('blue')==False assert check_element([1,2,3,4],7)==False([""green"",],'green')==True",0.0,0.3012301859908912 |
| "Prompt: Write a function that matches a string that has an a followed by two to three 'b'. Assesments: assert text_match_two_three(""ac"")==('Not matched!'), assert text_match_two_three(""dc"")==('Not matched!'), assert text_match_two_three(""abbbba"")==('Found a match!')",67,0.035,35,1.9142857142857144,"Prompt: Write function matches string followed two three 'b'.Assesments: assert text_match_two_three(""ac"")=='Not matcheddc)== matched'Found match!",0.0,0.3612170644916237 |
| "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. Assesments: assert max_sub_array_sum_repeated([10, 20, -30, -1], 4, 3) == 30, assert max_sub_array_sum_repeated([-1, 10, 20], 3, 2) == 59, assert max_sub_array_sum_repeated([-1, -2, -3], 3, 3) == -1",112,0.037,52,2.1538461538461537,Prompt: Write function find largest sum contiguous modified formed repeating k timesAssesments: assert max_sub_array_sum_repeated([10 20 -30 4 == 30 20 == 59[-1 -2 -3] 3) -1,0.0,0.5570625847703932 |
| "Prompt: Write a python function to find the sum of squares of first n even natural numbers. Assesments: assert square_Sum(2) == 20, assert square_Sum(3) == 56, assert square_Sum(4) == 120",55,0.035,27,2.037037037037037,Prompt: Write python function find sum squares natural numbersAssesments: assert square_Sum(2) 20 56 120,0.0,0.46156876159674937 |
| "Prompt: Write a function to count array elements having modular inverse under given prime number p equal to itself. Assesments: assert modular_inverse([ 1, 6, 4, 5 ], 4, 7) == 2, assert modular_inverse([1, 3, 8, 12, 12], 5, 13) == 3, assert modular_inverse([2, 3, 4, 5], 4, 6) == 1",103,0.034,52,1.9807692307692308,"Prompt: Write function count array elements modular inverse number p equalAssesments: assert modular_inverse( 1, 6 4 5 7) 3 8 12 5 13) 3 4 5 6)",0.0,0.41556868823871346 |
| "Prompt: Write a python function to calculate the number of odd days in a given year. Assesments: assert odd_Days(100) == 5, assert odd_Days(50) ==6, assert odd_Days(75) == 2",53,0.034,29,1.8275862068965518,Prompt: Write python function calculate odd days yearAssesments: assert odd_Days(100) 5(50)(75) 2,0.0,0.29033845797504276 |
| "Prompt: Write a function to find the list of lists with maximum length. Assesments: assert max_length([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(3, [13, 15, 17]), assert max_length([[1], [5, 7], [10, 12, 14,15]])==(4, [10, 12, 14,15]), assert max_length([[5], [15,20,25]])==(3, [15,20,25])",124,0.036,66,1.878787878787879,"Prompt: Write function find maximum lengthAssesments: assert max_length( 3, 7, 11, 15, 17]] [13 15 17 max_length, 7, 12, 14,15]] 12 14 max_length [15,20,25]],20,25",0.0,0.3321968636830098 |
| "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. Assesments: assert count_no_of_ways(2, 4) == 16, assert count_no_of_ways(3, 2) == 6, assert count_no_of_ways(4, 4) == 228",90,0.035,49,1.836734693877551,"Prompt: Write function find painting fence 2 posts same color n posts k colorsAssesments: assert count_no_of_ways(2, 4) == 16, 2) == 6, 4) == 228",0.0,0.297817531714617 |
| "Prompt: Write a python function to find quotient of two numbers. Assesments: assert find(10,3) == 3, assert find(4,2) == 2, assert find(20,5) == 4",49,0.034,26,1.8846153846153846,"Prompt: Write python find quotient numbersAssesments: assert find(10,3) 3,2) 2)",0.0,0.33696096794333563 |
| "Prompt: Write a function to find the third side of a right angled triangle. Assesments: assert otherside_rightangle(7,8)==10.63014581273465, assert otherside_rightangle(3,4)==5, assert otherside_rightangle(7,15)==16.55294535724685",67,0.034,35,1.9142857142857144,"Prompt: Write function third side right triangleAssesments: assert(7,8)==10.63014581273465,15)==16.55294535724685",0.0,0.3612170644916237 |
| "Prompt: Write a function to find the maximum value in a given heterogeneous list. Assesments: assert max_val(['Python', 3, 2, 4, 5, 'version'])==5, assert max_val(['Python', 15, 20, 25])==25, assert max_val(['Python', 30, 20, 40, 50, 'version'])==50",85,0.036,42,2.0238095238095237,Prompt: Write function find maximum value heterogeneous listAssesments: assert max_val('Python 3 2 4 5)==5 15 20 25 30 20 40 50,0.0,0.4507550011328348 |
| ,44,0.035,25,1.76,Prompt: Write function return divisors numberAssesments: assert sum_div(8)==7)==16(7)==1,0.0,0.23508536244052614 |
| ,79,0.034,44,1.7954545454545454,,0.0,0.264070172760349 |
| ,231,0.04,112,2.0625,,0.0,0.4823852504897845 |
| ,226,0.036,120,1.8833333333333333,,0.0,0.33591286500606393 |
| ,179,0.035,94,1.9042553191489362,,0.0,0.3530170129398384 |
| ,76,0.034,41,1.853658536585366,Prompt: Write function find count binary sequences length 2n first same last n bitsAssesments: assert count_binary_seq(1) == 2.0 6.0 20.0,0.0,0.31165311653116534 |
| ,82,0.034,46,1.7826086956521738,Prompt: Write function find depth dictionaryAssesments: assert dict_depth({'a':1 'b''c'd':'a':1 'b'python)==2({1: 'Sun' 2:'Mon')==3,0.0,0.25356842989084794 |
| "Prompt: Write a python function to find the most significant bit number which is also a set bit. Assesments: assert set_Bit_Number(6) == 4, assert set_Bit_Number(10) == 8, assert set_Bit_Number(18) == 16",59,0.034,31,1.903225806451613,Prompt: Write python function find significant bit number set bitAssesments: assert set_Bit_Number(6) 4) 8) 16,0.0,0.35217536541986044 |
| "Prompt: Write a python function to check whether the count of inversion of two types are same or not. Assesments: assert solve([1,0,2],3) == True, assert solve([1,2,0],3) == False, assert solve([1,2,1],3) == True",66,0.034,40,1.65,"Prompt: Write python function check inversion typesAssesments: assert solve[1,0,2],3) True,2,0] False[1,2,1],3) True",0.0,0.14515813042261394 |
| "Prompt: Write a python function to find element at a given index after number of rotations. Assesments: assert find_Element([1,2,3,4,5],[[0,2],[0,3]],2,1) == 3, assert find_Element([1,2,3,4],[[0,1],[0,2]],1,2) == 3, assert find_Element([1,2,3,4,5,6],[[0,1],[0,2]],1,1) == 1",114,0.038,63,1.8095238095238095,"Prompt: Write python function find element index rotationsAssesments: assert find_Element([1,2,3,4,5,2],3],2,1) 3(,3,4,1],2] 3(,5,6,1],2],1,1)",0.0,0.27557208161742164 |
| "Prompt: Write a function to match two words from a list of words starting with letter 'p'. Assesments: assert start_withp([""Python PHP"", ""Java JavaScript"", ""c c++""])==('Python', 'PHP'), assert start_withp([""Python Programming"",""Java Programming""])==('Python','Programming'), assert start_withp([""Pqrst Pqr"",""qrstuv""])==('Pqrst','Pqr')",87,0.035,48,1.8125,"Prompt: Write function match two words 'p'Assesments: assert start_withp(""Python c++'Python 'PHP start""Python Programming'Python start(Pqrst Pqr,qrstuv'Pqrst','Pqr' |
| 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 . Assesments: assert max_sum_increasing_subseq([1, 101, 2, 3, 100, 4, 5 ], 7, 4, 6) == 11, assert max_sum_increasing_subseq([1, 101, 2, 3, 100, 4, 5 ], 7, 2, 5) == 7, assert max_sum_increasing_subseq([11, 15, 19, 21, 26, 28, 31], 7, 2, 4) == 71Prompt: Write function find maximum sum increasing subsequence prefix ith index including kth element after i > iAssesments: assert max_sum_increasing_subseq(, 101 2 3 100 4 5 7 6) 11 5)[11 15 19, 21, 26, 28, 31 7 2 4) 71 |
| Prompt: Write a function to get a colon of a tuple. Assesments: assert colon_tuplex((HELLO, 5, [], True) ,2,50)==(HELLO, 5, [50], True) , assert colon_tuplex((HELLO, 5, [], True) ,2,100)==((HELLO, 5, [100],True)), assert colon_tuplex((HELLO, 5, [], True) ,2,500)==(HELLO, 5, [500], True)Prompt: Write function get colon tupleAssesments: assert colon_tuplex(HELLO, 5,)== 5 [50] assert colon_tuplex 5,100 5 [100] colon_tuplex 5 [,2,500)== 5 [500] True |
| Prompt: Write a function to find the specified number of largest products from two given lists. Assesments: assert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],3)==[60, 54, 50], assert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],4)==[60, 54, 50, 48], assert large_product([1, 2, 3, 4, 5, 6],[3, 6, 8, 9, 10, 6],5)==[60, 54, 50, 48, 45]Prompt: Write function find largest products two listsAssesments: assert large_product([1, 2 3 4 5, 6] 9 10 6,3)==[60, 54, 50] 6 10 6,4)==[60, 54, 50, 48] 10 6,5)==[60, 54, 50, 48, 45] |
| Prompt: Write a python function to find the maximum of two numbers. Assesments: assert maximum(5,10) == 10, assert maximum(-1,-2) == -1, assert maximum(9,7) == 9Prompt: Write python function find maximum numbersAssesments: assert maximum(5,10) 10(-1,-2),7) |
| Prompt: Write a function to convert a given string to a tuple. Assesments: assert string_to_tuple(python 3.0)==('p', 'y', 't', 'h', 'o', 'n', '3', '.', '0'), assert string_to_tuple(item1)==('i', 't', 'e', 'm', '1'), assert string_to_tuple(15.10)==('1', '5', '.', '1', '0')Prompt: Write function convert string tupleAssesments: assert string_to_tuplepython'p 'y '3 '0 string_tuple'i 't 'e 'm '1_tuple""15'1' '5' '. '1' '0' |
| Prompt: Write a python function to set the left most unset bit. Assesments: assert set_left_most_unset_bit(10) == 14, assert set_left_most_unset_bit(12) == 14, assert set_left_most_unset_bit(15) == 15 |
| Prompt: Write a function to find the volume of a cone. Assesments: assert volume_cone(5,12)==314.15926535897927, assert volume_cone(10,15)==1570.7963267948965, assert volume_cone(19,17)==6426.651371693521Prompt: Write function find volume coneAssesments: assert,12)==314.15926535897927,17)==6426.651371693521 |
| Prompt: Write a python function to print positive numbers in a list. Assesments: assert pos_nos([-1,-2,1,2]) == 1,2, assert pos_nos([3,4,-5]) == 3,4, assert pos_nos([-2,-3,1]) == 1Prompt: Write python function print positive numbers listAssesments: assert pos_nos[-1,-2,1,2 1,2,-5],-3,1] |
| 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. Assesments: assert max_sum_rectangular_grid([ [1, 4, 5], [2, 0, 0 ] ], 3) == 7, assert max_sum_rectangular_grid([ [ 1, 2, 3, 4, 5], [ 6, 7, 8, 9, 10] ], 5) == 24, assert max_sum_rectangular_grid([ [7, 9, 11, 15, 19], [21, 25, 28, 31, 32] ], 5) == 81Prompt: Write function maximum sum no numbers adjacent rectangular grid 2 nAssesments: assert max_sum [1 4 5 3) == 7 1 2 3 4 5 6 7 8 9 10 5) == 24 [7 9 11 15 19 25 28, 31, 32 81 |
| Prompt: Write a python function to find the first maximum length of even word. Assesments: assert find_Max_Len_Even(python language) == language, assert find_Max_Len_Even(maximum even length) == length, assert find_Max_Len_Even(eve) == -1Prompt: Write python function find first maximum length even wordAssesments: assert find_Max_Len_Evenpythonmaximum even length)eve) |
| Prompt: Write a function to find the index of the last occurrence of a given number in a sorted array. Assesments: assert find_last_occurrence([2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 3, assert find_last_occurrence([2, 3, 5, 8, 6, 6, 8, 9, 9, 9], 9) == 9, assert find_last_occurrence([2, 2, 1, 5, 6, 6, 6, 9, 9, 9], 6) == 6Prompt: Write function find index last occurrence number sorted arrayAssesments: assert find_last_occurrence([2, 5 6 8 9 5) 3 assert find_last_occurrence([2, 5 8 6 9) 9 find_last_occurrence([2 5 6 9 6) 6 |
| Prompt: Write a function to reflect the modified run-length encoding from a list. Assesments: assert modified_encode([1,1,2,3,4,4,5,1])==[[2, 1], 2, 3, [2, 4], 5, 1], assert modified_encode('automatically')==['a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', 'a', [2, 'l'], 'y'], assert modified_encode('python')==['p', 'y', 't', 'h', 'o', 'n']Prompt: Write function modified run-length encoding listAssesments: assert modified_encode([1,1,2,1][2 3 4 5 1_encode('automatically['a 'u 'o 'm 'c 'l 'y modified_encode('python['p' 'y 't 'h 'o 'n'",0.0,0.3962536483947062 |
| "Prompt: Write a python function to find the maximum volume of a cuboid with given sum of sides. Assesments: assert max_volume(8) == 18, assert max_volume(4) == 2, assert max_volume(1) == 0",54,0.034,27,2.0,Prompt: Write python function find maximum volume cuboid sidesAssesments: assert max_volume(8) 18 2 0,0.0,0.43129023229778896 |
| "Prompt: Write a function to find all five characters long word in the given string by using regex. Assesments: assert find_long_word('Please move back to strem') == ['strem'], assert find_long_word('4K Ultra HD streaming player') == ['Ultra'], assert find_long_word('Streaming Media Player') == ['Media']",70,0.035,41,1.7073170731707317,Prompt: Write function find five characters string regexAssesments: assert find_long_word( move strem ['strem'4K Ultra HD streaming player'Ultra'Streaming Media Player'Media,0.0,0.1920160007645416 |
| ,59,0.038,35,1.6857142857142857,Prompt: Write function calculate difference sum first n natural numbers firstAssesments: assert sum_difference(12)==5434(20)==41230(54)==2151270,0.0,0.17435528367518288 |
| ,70,0.04,37,1.8918918918918919,Prompt: Write function find demlo number givenAssesments: assert find_demlo '12345654321 '1234321' '123456789101110987654321',0.0,0.3429096602900129 |
| "Prompt: Write a function to find all index positions of the minimum values in a given list. Assesments: assert position_min([12,33,23,10,67,89,45,667,23,12,11,10,54])==[3,11], assert position_min([1,2,2,2,4,4,4,5,5,5,5])==[0], assert position_min([2,1,5,6,8,3,4,9,10,11,8,12])==[1]",121,0.034,65,1.8615384615384616,"Prompt: Write function find minimum values listAssesments: assert position_min([3,11]([1,2,2,4,4,4,5,5,5,5[0[2,1,5,6,8,3,4,9,11,8,12]",0.0,0.31809511507244503 |
| "Prompt: Write a function to re-arrange the given array in alternating positive and negative items. Assesments: assert re_arrange([-5, -2, 5, 2, 4, 7, 1, 8, 0, -8], 10) == [-5, 5, -2, 2, -8, 4, 7, 1, 8, 0], assert re_arrange([1, 2, 3, -4, -1, 4], 6) == [-4, 1, -1, 2, 3, 4], assert re_arrange([4, 7, 9, 77, -4, 5, -3, -9], 8) == [-4, 4, -3, 7, -9, 9, 77, 5]",191,0.056,90,2.1222222222222222,"Prompt: Write function re-arrange array positive negative itemsAssesments: assert re_arrange[-5, -2 2 4 7 1 8 5 -2 2 -8 7 8[1 2 3 -4 -1 6) 1 -1 3 4[4, 7 9 77 -4 5 -3 [-4 4 -3 5",0.0,0.5312093789843579 |
| "Prompt: Write a function to extract the sum of alternate chains of tuples. Assesments: assert sum_of_alternates((5, 6, 3, 6, 10, 34)) == (46, 18), assert sum_of_alternates((1, 2, 3, 4, 5)) == (6, 9), assert sum_of_alternates((6, 7, 8, 9, 4, 5)) == (21, 18)",109,0.045,51,2.1372549019607843,"Prompt: Write function extract sum chains tuplesAssesments: assert((5 10 34 (46, 2 3 4 5) (6, 9) 7 8 4 5) (21, 18",0.0,0.5434988996998182 |
| "Prompt: Write a python function to find the minimum number of squares whose sum is equal to a given number. Assesments: assert get_Min_Squares(6) == 3, assert get_Min_Squares(2) == 2, assert get_Min_Squares(4) == 1",61,0.034,37,1.6486486486486487,Prompt: Write python function find minimum squares equal numberAssesments: assert_Min_Squares(6) 3_Squares(2) 2_Squares(4) 1,0.0,0.14405337327251683 |
| "Prompt: Write a function to get the word with most number of occurrences in the given strings list. Assesments: assert most_occurrences([""UTS is best for RTF"", ""RTF love UTS"", ""UTS is best""] ) == 'UTS', assert most_occurrences([""Its been a great year"", ""this year is so worse"", ""this year is okay""] ) == 'year', assert most_occurrences([""Families can be reunited"", ""people can be reunited"", ""Tasks can be achieved ""] ) == 'can'",112,0.035,64,1.75,"Prompt: Write function word most occurrences strings listAssesments: assert most_occurrences(""UTS best RTF"", ""RTF love UTS"", best""] ) 'UTS' assert most_occurrences( great okay"" ) == 'year' assert most_occurrences(""Families ""Tasks achieved == 'can'",0.0,0.22691015952980684 |
| "Prompt: Write a function to print check if the triangle is isosceles or not. Assesments: assert check_isosceles(6,8,12)==False , assert check_isosceles(6,6,12)==True, assert check_isosceles(6,16,20)==False",67,0.035,34,1.9705882352941178,"Prompt: Write function check triangle isoscelesAssesments: assert check_isosceles(6,8,12)==False,16,20)==False",0.0,0.40724551785449703 |
| "Prompt: Write a function to rotate a given list by specified number of items to the left direction. Assesments: assert 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], assert rotate_left([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],2,2)==[3, 4, 5, 6, 7, 8, 9, 10, 1, 2], assert rotate_left([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],5,2)==[6, 7, 8, 9, 10, 1, 2]",219,0.037,105,2.085714285714286,"Prompt: Write function rotate list items leftAssesments: assert rotate_left( 2 3 4 5 6 7 8 9 10,3,4[4 5 6 7 8 9 10 4 10[3 4 5 6 7 8 10 1 2_left([1 2 6 7 8 9 10[6 7 8 9 10 1, 2]",0.0,0.5013634001039543 |
| "Prompt: Write a python function to count negative numbers in a list. Assesments: assert neg_count([-1,-2,3,-4,-5]) == 4, assert neg_count([1,2,3]) == 0, assert neg_count([1,2,-3,-10,20]) == 2",67,0.034,33,2.0303030303030303,"Prompt: Write python function count negative numbers listAssesments: assert neg_count 4[1,2,3] 0,-3,20 2",0.0,0.4560635744514837 |
| "Prompt: Write a function to find all three, four, five characters long words in the given string by using regex. Assesments: assert find_char('For the four consumer complaints contact manager AKR reddy') == ['For', 'the', 'four', 'AKR', 'reddy'], assert find_char('Certain service are subject to change MSR') == ['are', 'MSR'], assert find_char('Third party legal desclaimers') == ['Third', 'party', 'legal']",104,0.035,53,1.9622641509433962,Prompt: Write function find three four five words string regex.Assesments: assert find_char( four consumer complaints contact manager AKR reddy' find_char('Certain service subject change MSR' find_char('Third party legal desclaimers''Third 'legal',0.0,0.40044040999318786 |
| "Prompt: Write a python function to count unset bits of a given number. Assesments: assert count_unset_bits(2) == 1, assert count_unset_bits(4) == 2, assert count_unset_bits(6) == 1",54,0.034,25,2.16,Prompt: Write python function count bits numberAssesments: assert_bits(2) == 1 == 2 1,0.0,0.5620934788692976 |
| "Prompt: Write a function to count character frequency of a given string. Assesments: assert char_frequency('python')=={'p': 1, 'y': 1, 't': 1, 'h': 1, 'o': 1, 'n': 1}, assert char_frequency('program')=={'p': 1, 'r': 2, 'o': 1, 'g': 1, 'a': 1, 'm': 1}, assert char_frequency('language')=={'l': 1, 'a': 2, 'n': 1, 'g': 2, 'u': 1, 'e': 1}",147,0.035,73,2.0136986301369864,Prompt: Write function count frequency stringAssesments: assert char_frequency'python'p 'y 't' 'h' 'o' 'n''p' 'r' 'o' 'g' 'a' 'm''l' 1 'a' 'n' 1 'g' 'u' 1 'e' 1,0.0,0.4424891403946647 |
| ,187,0.043,127,1.4724409448818898,Prompt: Write python function sort list second element sublistAssesments: assert Sort('a' 10'b' 5'c' 20'd' 15]] [['b' 5'a' 10'd' 15'c' assert Sort['452' 10'256' 5'100' 20'135''256''452''135' 15'100' Sort['rishi' 10'akhil' 5'ramya' 20'gaur' 15]]'akhil' 5'rishi''gaur' 15'ramya',0.0,0.0 |
| ,65,0.035,37,1.7567567567567568,,0.0,0.23243394528029288 |
| ,52,0.034,28,1.8571428571428572,,0.0,0.3145016192875135 |
| ,49,0.035,29,1.6896551724137931,,0.0,0.1775770385168457 |
| ,67,0.034,33,2.0303030303030303,,0.0,0.4560635744514837 |
| ,72,0.037,39,1.8461538461538463,Prompt: Write python function count substrings same first last charactersAssesments: assert count_Substring_Equal_Ends'aba) == 4'abcab 7'abc 3,0.0,0.30551787982518464 |
| "Prompt: Write a python function to find the maximum occuring divisor in an interval. Assesments: assert find_Divisor(2,2) == 2, assert find_Divisor(2,5) == 2, assert find_Divisor(5,10) == 2",62,0.035,32,1.9375,"Prompt: Write python function find maximum divisor intervalAssesments: assert find_Divisor(2,2) 2(2,5),10)",0.0,0.38019521410579343 |
| "Prompt: Write a python function to find the sum of the three lowest positive numbers from a given list of numbers. Assesments: assert sum_three_smallest_nums([10,20,30,40,50,60,7]) == 37, assert sum_three_smallest_nums([1,2,3,4,5]) == 6, assert sum_three_smallest_nums([0,1,2,3,4,5]) == 6",95,0.037,52,1.8269230769230769,"Prompt: Write python function sum three lowest numbers listAssesments: assert sum_three_smallest_nums([10,20,60,7] 37([1,2,3,4,5 == 6,3,4,5 6",0.0,0.28979633576610897 |
| "Prompt: Write a function to convert the given set into ordered tuples. Assesments: assert set_to_tuple({1, 2, 3, 4, 5}) == (1, 2, 3, 4, 5), assert set_to_tuple({6, 7, 8, 9, 10, 11}) == (6, 7, 8, 9, 10, 11), assert set_to_tuple({12, 13, 14, 15, 16}) == (12, 13, 14, 15, 16)",129,0.034,63,2.0476190476190474,"Prompt: Write function convert set tuplesAssesments: assert set_to_tuple({1, 2 3 4 5}) (1 assert_to_tuple({6, 7 8 9 10, 11})_to_tuple({12, 13, 14 15 16})",0.0,0.4702197699678806 |
| "Prompt: Write a function to find the smallest range that includes at-least one element from each of the given arrays. Assesments: assert find_minimum_range([[3, 6, 8, 10, 15], [1, 5, 12], [4, 8, 15, 16], [2, 6]]) == (4, 6), assert find_minimum_range([[ 2, 3, 4, 8, 10, 15 ], [1, 5, 12], [7, 8, 15, 16], [3, 6]]) == (4, 7), assert find_minimum_range([[4, 7, 9, 11, 16], [2, 6, 13], [5, 9, 16, 17], [3, 7]]) == (5, 7)",194,0.034,100,1.94,"Prompt: Write function find smallest range element arraysAssesments: assert find_minimum_range, 6 8 10 15 [1 5 12 8 15 16, (4, 6) 3 4 8 10 15 15 16 [3, (4, 7)_range, 7, 9 11 16 6 13, 9 16 17 [3, (5, 7)",0.0,0.38223901483347317 |
| "Prompt: Write a function to calculate the number of digits and letters in a string. Assesments: assert dig_let(""python"")==(6,0), assert dig_let(""program"")==(7,0), assert dig_let(""python3.0"")==(6,2)",60,0.047,27,2.2222222222222223,"Prompt: Write function calculate digits letters stringAssesments: assert dig_let(6,0),(7,0),2)",0.0,0.6129614080915509 |
| "Prompt: Write a python function to find number of elements with odd factors in a given range. Assesments: assert count_Odd_Squares(5,100) == 8, assert count_Odd_Squares(8,65) == 6, assert count_Odd_Squares(2,5) == 1",67,0.035,38,1.763157894736842,"Prompt: Write python function find elements odd factors rangeAssesments:_Odd_Squares(5,100) 8(8,65) 6(2,5) 1",0.0,0.23766700546496375 |
| "Prompt: Write a function to find the difference between two consecutive numbers in a given list. Assesments: assert diff_consecutivenums([1, 1, 3, 4, 4, 5, 6, 7])==[0, 2, 1, 0, 1, 1, 1], assert diff_consecutivenums([4, 5, 8, 9, 6, 10])==[1, 3, 1, -3, 4], assert diff_consecutivenums([0, 1, 2, 3, 4, 4, 4, 4, 5, 7])==[1, 1, 1, 1, 0, 0, 0, 1, 2]",178,0.034,86,2.0697674418604652,"Prompt: Write function find difference numbers listAssesments: assert diff_consecutivenums([1, 3 4 4 5 6 7[0 2([4, 5 8 9 6 10[1, 3 1 -3 4_consecutivenums[0 1 2, 3 4 5 7][1, 1]",0.0,0.4883265316749003 |
| "Prompt: Write a function to find entringer number e(n, k). Assesments: assert zigzag(4, 3) == 5, assert zigzag(4, 2) == 4, assert zigzag(3, 1) == 1",57,0.034,30,1.9,Prompt: Write function find eAssesments: assert zigzag(4 3) 5 2) 4 1) 1,0.0,0.34953820319059603 |
| "Prompt: Write a python function to count the number of squares in a rectangle. Assesments: assert count_Squares(4,3) == 20, assert count_Squares(1,2) == 2, assert count_Squares(2,2) == 5",58,0.034,34,1.7058823529411764,"Prompt: Write python function count squares rectangleAssesments: assert_Squares(4,3) 20(1,2) 2,2) 5",0.0,0.19084308786486878 |
| "Prompt: Write a function to count sequences of given length having non-negative prefix sums that can be generated by given values. Assesments: assert find_ways(4) == 2, assert find_ways(6) == 5, assert find_ways(8) == 14",60,0.034,32,1.875,Prompt: Write function count sequences non-negative prefix sums generated valuesAssesments: assert find_ways(4) 2 5(8) 14,0.0,0.3291001959137979 |
| "Prompt: Write a python function to check whether the given string is a binary string or not. Assesments: assert check(""01010101010"") == ""Yes"", assert check(""name0"") == ""No"", assert check(""101"") == ""Yes""",54,0.034,30,1.8,"Prompt: Write python function check string binaryAssesments: assert check( == ""Yes"",""name0"") ""No"",""101"") ""Yes""",0.0,0.2677861740834033 |
| "Prompt: Write a python function to minimize the length of the string by removing occurrence of only one character. Assesments: assert minimum_Length(""mnm"") == 1, assert minimum_Length(""abcda"") == 3, assert minimum_Length(""abcb"") == 2",57,0.036,32,1.78125,"Prompt: Write python function minimize length string removing characterAssesments: assert minimum_Length""mnm"") == 1 3""abcb"") 2",0.0,0.2524576686258046 |
| "Prompt: Write a python function to find the first element occurring k times in a given array. Assesments: assert first_Element([0,1,2,3,4,5],6,1) == 0, assert first_Element([1,2,1,3,4],5,2) == 1, assert first_Element([2,3,4,3,5,7,1,2,3,5],10,2) == 2",100,0.035,59,1.694915254237288,"Prompt: Write python function first element arrayAssesments: assert(,1,2,3,4,5,6,1) 0,3,4,5,2) 1[2,3,4,3,5,7,10,2)",0.0,0.1818772621402514 |
| "Prompt: Write a python function to check whether all the characters in a given string are unique. Assesments: assert unique_Characters('aba') == False, assert unique_Characters('abc') == True, assert unique_Characters('abab') == False",52,0.035,28,1.8571428571428572,Prompt: Write python function check characters string uniqueAssesments: assert unique_Characters('aba') False'abc True'abab') False,0.0,0.3145016192875135 |
| ,185,0.034,99,1.8686868686868687,,0.0,0.32393908296511154 |
| ,56,0.034,29,1.9310344827586208,,0.0,0.3749095225686905 |
| ,55,0.035,27,2.037037037037037,Prompt: Write python function count rectangles circle radius rAssesments: assert count_Rectangles(2) 8 1 0,0.0,0.46156876159674937 |
| ,50,0.034,28,1.7857142857142858,,0.0,0.2561073127823758 |
| ,131,0.036,72,1.8194444444444444,,0.0,0.28368240196535743 |
| ,91,0.034,47,1.9361702127659575,,0.0,0.37910808605915525 |
| ,72,0.034,41,1.7560975609756098,,0.0,0.23189503935341618 |
| ,51,0.034,27,1.8888888888888888,Prompt: Write function find n’th carol numberAssesments: assert_carol(2) 7 223 959,0.0,0.34045464440090795 |
| ,133,0.036,85,1.5647058823529412,,0.0,0.07542845853706717 |
| ,101,0.042,49,2.061224489795918,,0.0,0.4813424950164783 |
| ,207,0.035,107,1.9345794392523366,,0.0,0.37780759643327033 |
| ,77,0.034,42,1.8333333333333333,,0.0,0.29503685045246747 |
| ,58,0.035,31,1.8709677419354838,Prompt: Write python function count digits numberAssesments: assert count_Digit(12345) 5(11223305) 8 7,0.0,0.32580374312721744 |
| ,80,0.034,46,1.7391304347826086,,0.0,0.21802406940945976 |
| ,51,0.034,27,1.8888888888888888,Prompt: Write function check binary tree balancedAssesments: assert_tree_balanced(root) False(root1) True(root2) False,0.0,0.34045464440090795 |
| ,131,0.035,68,1.9264705882352942,,0.0,0.3711784461895589 |
| ,66,0.035,36,1.8333333333333333,,0.0,0.29503685045246747 |
| ,179,0.034,100,1.79,Prompt: Write function sort tuple float elementAssesments: assert float_sort('item1.20 '15.10 '24.5' '24.5.10 '12.20 assert float_sort'item1 '15' '10' '20' '20 '15' '10' assert float_sort('item1' '5' '10'item3' '14')'item3' '14'item2' '10'item1' '5',0.0,0.259610971172684 |
| "Prompt: Write a function to find the smallest missing element in a sorted array. Assesments: assert smallest_missing([0, 1, 2, 3, 4, 5, 6], 0, 6) == 7, assert smallest_missing([0, 1, 2, 6, 9, 11, 15], 0, 6) == 3, assert smallest_missing([1, 2, 3, 4, 6, 9, 11, 15], 0, 7) == 0",124,0.034,57,2.175438596491228,Prompt: Write function find smallest missing element sorted arrayAssesments: assert smallest_missing( 1 2 3 4 5 6 6) 7 9 11 15 3 assert 2 6 9 11 15 7),0.0,0.5747148447665484 |
| "Prompt: Write a function to sort a given list of elements in ascending order using heap queue algorithm. Assesments: assert heap_assending([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1])==[1, 2, 3, 4, 7, 8, 9, 9, 10, 14, 18], assert heap_assending([25, 35, 22, 85, 14, 65, 75, 25, 58])==[14, 22, 25, 25, 35, 58, 65, 75, 85], assert heap_assending([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]",219,0.035,101,2.1683168316831685,"Prompt: Write function sort elements ascending heap queue algorithmAssesments: assert heap_assending([18, 14 10 9 8 3 2 4 1 2 3 4 7 8[25, 35 22, 85 14 65 75 25 58 35 65 75 85[1, 3 5 7 9 2, 4 6 8 0 2 3",0.0,0.5688926575277176 |
| "Prompt: Write a function to find the volume of a cuboid. Assesments: assert volume_cuboid(1,2,3)==6, assert volume_cuboid(5,7,9)==315, assert volume_cuboid(10,15,21)==3150",60,0.034,32,1.875,"Prompt: Write function find volume cuboidAssesments: assert,2,3)==6,7,9)==315,15,21)==3150",0.0,0.3291001959137979 |
| "Prompt: Write a function to print all permutations of a given string including duplicates. Assesments: assert permute_string('ab')==['ab', 'ba'], assert permute_string('abc')==['abc', 'bac', 'bca', 'acb', 'cab', 'cba'], assert 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']",166,0.034,86,1.930232558139535,Prompt: Write function print permutations string duplicatesAssesments: assert permute_string('ab'abc'abcd'abcd 'bacd 'bcda 'acbd 'cabd 'cbda 'cadb 'cdab 'cdba 'abdc 'badc 'bdac 'bdca 'adbc 'dabc 'dbac 'dbca 'adcb 'dacb 'dcab' 'dcba',0.0,0.3742539329206777 |
| "Prompt: Write a function to round the given number to the nearest multiple of a specific number. Assesments: assert round_num(4722,10)==4720, assert round_num(1111,5)==1110, assert round_num(219,2)==218",56,0.034,34,1.6470588235294117,"Prompt: Write function round nearest multipleAssesments: assert round_num(4722,10)==4720(1111,5)==1110,2)==218",0.0,0.14275365897828474 |
| "Prompt: Write a function to remove tuple elements that occur more than once and replace the duplicates with some custom value. Assesments: assert remove_replica((1, 1, 4, 4, 4, 5, 5, 6, 7, 7)) == (1, 'MSP', 4, 'MSP', 'MSP', 5, 'MSP', 6, 7, 'MSP'), assert remove_replica((2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9)) == (2, 3, 4, 'MSP', 5, 6, 'MSP', 7, 8, 9, 'MSP'), assert remove_replica((2, 2, 5, 4, 5, 7, 5, 6, 7, 7)) == (2, 'MSP', 5, 4, 'MSP', 7, 'MSP', 6, 'MSP', 'MSP')",241,0.036,120,2.0083333333333333,"Prompt: Write function remove tuple elements replace duplicates custom valueAssesments: assert remove_replica((1, 1, 4 5 5 6 7 7)) 'MSP 4 5 6 7 assert remove_replica((2, 3, 4 5 6 7 8 9 9)) 5 6 7 8 9_replica((2, 2, 5 4 5 7 6 7) (2 'MSP' 5 4 7 6,'",0.0,0.438102901390055 |
| "Prompt: Write a python function to remove all occurrences of a character in a given string. Assesments: assert remove_Char(""aba"",'a') == ""b"", assert remove_Char(""toggle"",'g') == ""tole"", assert remove_Char(""aabbc"",'b') == ""aac""",64,0.035,33,1.9393939393939394,"Prompt: Write python function remove occurrences character stringAssesments: assert remove_Char( == ""b"", ""tole"",""aabbc"", ""aac""",0.0,0.3817435479903994 |
| "Prompt: Write a python function to shift last element to first position in the given list. Assesments: assert move_first([1,2,3,4]) == [4,1,2,3], assert move_first([0,1,2,3]) == [3,0,1,2], assert move_first([9,8,7,1]) == [1,9,8,7]",88,0.034,50,1.76,"Prompt: Write python function shift element first listAssesments: assert move_first[1,2,3,4 [4,1,2,3] [3,0,1,2 [1,9,8,7]",0.0,0.23508536244052614 |
| "Prompt: Write a function to find the surface area of a cuboid. Assesments: assert surfacearea_cuboid(1,2,3)==22, assert surfacearea_cuboid(5,7,9)==286, assert surfacearea_cuboid(10,15,21)==1350",64,0.034,33,1.9393939393939394,"Prompt: Write function find surface area cuboidAssesments: assert,2,3)==22,7,9)==286,15,21)==1350",0.0,0.3817435479903994 |
| "Prompt: Write a function to generate a two-dimensional array. Assesments: assert multi_list(3,4)==[[0, 0, 0, 0], [0, 1, 2, 3], [0, 2, 4, 6]] , assert 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]], assert 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]]",632,0.037,291,2.1718213058419242,"Prompt: Write function two-dimensional arrayAssesments: assert multi_list(3,4 3 4 multi_list(5,7 3 4 5 6 12 18 multi_list(10 2 3 4 5 6 7 8 9 10 11 12 14 4 6 8 10 12 14 16 18 20 22, 24 26, 28 3 6 9 12 15 18 21, 24 27, 30 33 36 39 42 4 8 12 16 20 24 36 40 44 48 52 56 5 10 15 20 25 30 35 40 45 50 55 60 65 70 6 12 18 24 30 36 42 48 54 60 66 72 78 84 7 14 21, 28, 35 42 49 56 63 70 77 84 91 98 8 16 24 32 40 48 56 64 72 80 88 96 104 112 9 18 27, 36 45 54 63 72 81 90 99 108 117",0.01,0.5717576362620377 |
| "Prompt: Write a function to sort a list of lists by a given index of the inner list. Assesments: assert 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)], assert 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)], assert 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)]",330,0.036,171,1.9298245614035088,"Prompt: Write function sort list index inner listAssesments: assert index_on_inner_list('Greyson Fulton' 98, Kent' 97,'Wyatt Knott' 91, Turnbull' 94, 98) Turnbull 94 Kent' 97,'Greyson Fulton' 98, Knott' 91, assert index_inner_list( Fulton 98 Kent 97,'Wyatt Knott' 91, Turnbull 94, Knott 91 Turnbull 94 Kent' 97,'Greyson Fulton' 98, 99) assert index_on_inner_list( Fulton' 98, Kent' 97, Knott' 91, Turnbull 94,'Wyatt Knott' 91, Kent' 97, Turnbull' 94,'Greyson Fulton' 98,",0.0,0.3739203873102852 |
| "Prompt: Write a function to find the number of rotations in a circularly sorted array. Assesments: assert find_rotation_count([8, 9, 10, 1, 2, 3, 4, 5, 6, 7]) == 3, assert find_rotation_count([8, 9, 10,2, 5, 6]) == 3, assert find_rotation_count([2, 5, 6, 8, 9, 10]) == 0",110,0.034,53,2.0754716981132075,Prompt: Write function find rotations sorted arrayAssesments: assert find_rotation_count([8 9 10 1 3 4 5 6 7 == 3 5 6[2 5 6 8 9 10,0.0,0.4929898769069911 |
| "Prompt: Write a python function to toggle all odd bits of a given number. Assesments: assert even_bit_toggle_number(10) == 15, assert even_bit_toggle_number(20) == 1, assert even_bit_toggle_number(30) == 11",55,0.034,31,1.7741935483870968,Prompt: Write python function toggle odd bits numberAssesments: assert_toggle_number(10) 15(20) 1(30) 11,0.0,0.24668887624928898 |
| "Prompt: Write a python function to find the frequency of the smallest value in a given array. Assesments: assert frequency_Of_Smallest(5,[1,2,3,4,3]) == 1, assert frequency_Of_Smallest(7,[3,1,2,5,6,2,3]) == 1, assert frequency_Of_Smallest(7,[3,3,6,3,7,4,9]) == 3",102,0.034,54,1.8888888888888888,"Prompt: Write python function smallest value arrayAssesments: assert frequency,[1,2,3,4,3]) 1(7,[3,1,2,5,6,2,3](7,[3,3,4,9]",0.0,0.34045464440090795 |
| "Prompt: Write a function to find the n'th perrin number using recursion. Assesments: assert get_perrin(9) == 12, assert get_perrin(4) == 2, assert get_perrin(6) == 5 |
| Prompt: Write a function to find out the minimum no of swaps required for bracket balancing in the given string. Assesments: assert swap_count([]][][) == 2, assert swap_count([[][]]) == 0, assert swap_count([[][]]][) == 1Prompt: Write function find minimum swaps bracket balancing stringAssesments: assert swap_count([]][][) == 2 0 == 1 |
| Prompt: Write a python function to check whether the hexadecimal number is even or odd. Assesments: assert even_or_odd(AB3454D) ==Odd, assert even_or_odd(ABC) == Even, assert even_or_odd(AAD) == OddPrompt: Write python function check hexadecimal number even oddAssesments: assert even_or_oddAB3454D)AAD) Odd |
| Prompt: Write a python function to find the highest power of 2 that is less than or equal to n. Assesments: assert highest_Power_of_2(10) == 8, assert highest_Power_of_2(19) == 16, assert highest_Power_of_2(32) == 32 |
| Prompt: Write a function to find the n'th lucas number. Assesments: assert find_lucas(9) == 76, assert find_lucas(4) == 7, assert find_lucas(3) == 4",53,0.034,26,2.0384615384615383,Prompt: Write function find lucas numberAssesments: assert find_lucas(9) 76 7 4,0.0,0.4627333204159399 |
| "Prompt: Write a function to insert a given string at the beginning of all items in a list. Assesments: assert add_string([1,2,3,4],'temp{0}')==['temp1', 'temp2', 'temp3', 'temp4'], assert add_string(['a','b','c','d'], 'python{0}')==[ 'pythona', 'pythonb', 'pythonc', 'pythond'], assert add_string([5,6,7,8],'string{0}')==['string5', 'string6', 'string7', 'string8']",127,0.035,72,1.7638888888888888,"Prompt: Write function insert string beginning items listAssesments: assert add_string([1,2,3,4]'temp{0}')=='temp1'_string(['a] 'python{0}')== 'pythona''' add_string([5,6,7,8]'string{0}')==['string5' 'string6'] |
| Prompt: Write a function to convert more than one list to nested dictionary. Assesments: assert 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}}], assert 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}}], assert 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}}]Prompt: Write function convert list to nested dictionaryAssesments: assert convert_list_dictionary(Adina Leyton Duncan Boyle, Saim Richards[85, 98 89 92]'S001 Park'S002'Leyton Marsh'S003'Duncan Boyle'S004'Saim Richards 92}} assert convert_list_dictionary([""abc"",""jkl""programs[100,200,300,400]'abc'python:100}}'def:200}}'ghi'language:300}}'jkl'programs:400}} assert convert_list_dictionary(A1,A4C++,DBMS[10,20,30,40]'A1'A2'A3'C++'A4'DBMS':40}}",0.0,0.27099213600917554 |
| "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). Assesments: assert get_max_sum(60) == 106, assert get_max_sum(10) == 12, assert get_max_sum(2) == 2",84,0.034,42,2.0,"Prompt: Write function find maximum sum equation f(n) = max))))),Assesments: assert get_max_sum(60) == 106_sum(10) == 12_sum(2) 2",0.0,0.43129023229778896 |
| "Prompt: Write a function to find the list with maximum length using lambda function. Assesments: assert max_length_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==(3, [13, 15, 17]), assert max_length_list([[1,2,3,4,5],[1,2,3,4],[1,2,3],[1,2],[1]])==(5,[1,2,3,4,5]), assert max_length_list([[3,4,5],[6,7,8,9],[10,11,12]])==(4,[6,7,8,9])",150,0.035,88,1.7045454545454546,"Prompt: Write function maximum length lambdaAssesments: assert max_length_list[0 3 7 11 15 [13 15 17 max_length[1,2,3,4,5,3,4,3][1,2,3,4,5_length[3,4,5[6,7,8,9,11,12]],[6,7,8,9]",0.0,0.18975014629926468 |
| "Prompt: Write a function to check if given tuple is distinct or not. Assesments: assert check_distinct((1, 4, 5, 6, 1, 4)) == False, assert check_distinct((1, 4, 5, 6)) == True, assert check_distinct((2, 3, 4, 5, 6)) == True",84,0.033,42,2.0,Prompt: Write function check tuple distinctAssesments: assert check_distinct((1 4 5 False assert((1 4 6) True((2 3 4 5 6),0.0,0.43129023229778896 |
| "Prompt: Write a python function to find the first non-repeated character in a given string. Assesments: assert first_non_repeating_character(""abcabc"") == None, assert first_non_repeating_character(""abc"") == ""a"", assert first_non_repeating_character(""ababc"") == ""c""",63,0.033,30,2.1,"Prompt: Write python function find first non-repeated character stringAssesments: assert first_non_repeating_character(""abcabc"") == None ""c",0.0,0.5130422614049819 |
| "Prompt: Write a function to check whether the given string starts and ends with the same character or not using regex. Assesments: assert check_char(""abba"") == ""Valid"", assert check_char(""a"") == ""Valid"", assert check_char(""abcd"") == ""Invalid""",57,0.033,32,1.78125,"Prompt: Write function check string starts ends same character regexAssesments: assert check_char""abba"")""a"") ""Valid"",""abcd"") ""Invalid""",0.0,0.2524576686258046 |
| "Prompt: Write a function to find the median of three specific numbers. Assesments: assert median_numbers(25,55,65)==55.0, assert median_numbers(20,10,30)==20.0, assert median_numbers(15,45,75)==45.0",59,0.033,35,1.6857142857142857,"Prompt: Write function median numbersAssesments: assert,55,65)==55.0,10,30)==20.0,45,75)==45.0",0.0,0.17435528367518288 |
| "Prompt: Write a function to compute the sum of digits of each number of a given list. Assesments: assert sum_of_digits([10,2,56])==14, assert sum_of_digits([[10,20,4,5,'b',70,'a']])==19, assert sum_of_digits([10,20,-4,5,-70])==19",77,0.033,43,1.7906976744186047,"Prompt: Write function compute sum digits listAssesments: assert sum_digits[10,2,56])==14,20,4,5,,70,'a,20,-4,5,-70] |
| Prompt: Write a function to perform the mathematical bitwise xor operation across the given tuples. Assesments: assert bitwise_xor((10, 4, 6, 9), (5, 2, 3, 3)) == (15, 6, 5, 10), assert bitwise_xor((11, 5, 7, 10), (6, 3, 4, 4)) == (13, 6, 3, 14), assert bitwise_xor((12, 6, 8, 11), (7, 4, 5, 6)) == (11, 2, 13, 13)Prompt: Write function tuplesAssesments: assert 4 6 9) (5 2 3 3) (15, 6 5 5 7 (6 3 4 4) (13, 6 6 8 (7 4 5 6) (11, 2 13, 13 |
| Prompt: Write a function to extract the frequency of unique tuples in the given list order irrespective. Assesments: assert extract_freq([(3, 4), (1, 2), (4, 3), (5, 6)] ) == 3, assert extract_freq([(4, 15), (2, 3), (5, 4), (6, 7)] ) == 4, assert extract_freq([(5, 16), (2, 3), (6, 5), (6, 9)] ) == 4Prompt: Write function extract frequency tuples orderAssesments: assert extract_freq, 4) (1, (4 (5 6) 3, (2, 3) (5 (6, 7) 4, (2, 3) (6, (6 9) 4 |
| Prompt: Write a function to perform index wise addition of tuple elements in the given two nested tuples. Assesments: assert 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)), assert 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)), assert 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))Prompt: Write function addition tuple tuplesAssesments: assert add_nested, 3) (4, 5) (2, 9) (1,, 7) (3,, (7, (3, (8, 13, 4) (5, 6) (3, (2, 11, (4, (2, (8,, (5, (10, 15, 5) (6, 7) (4, (3, 12, 9) (5, (3,,, (11, (7, (12, 17 |
| Prompt: Write a function to compute the value of ncr%p. Assesments: assert ncr_modp(10,2,13)==6, assert ncr_modp(15,12,43)==25, assert ncr_modp(17,9,18)==10Prompt: Write function compute ncrAssesments: assert_modp(10,2,13)==6(15,12,43)==25,18)==10 |
| Prompt: Write a function to check if a url is valid or not using regex. Assesments: assert is_valid_URL(https://www.google.com) == True, assert is_valid_URL(https:/www.gmail.com) == False, assert is_valid_URL(https:// www.redit.com) == FalsePrompt: Write function check url valid using regex.Assesments: assert_valid_URL(https://www.google.com) True_URL(https False(.redit.com) False |
| Prompt: Write a python function to find the minimum of two numbers. Assesments: assert minimum(1,2) == 1, assert minimum(-5,-4) == -5, assert minimum(0,0) == 0Prompt: Write python function minimum numbersAssesments: assert(1,2) 1,-4) -5(0,0) |
| Prompt: Write a function to check whether an element exists within a tuple. Assesments: assert check_tuplex((w, 3, r, e, s, o, u, r, c, e),'r')==True, assert check_tuplex((w, 3, r, e, s, o, u, r, c, e),'5')==False, assert check_tuplex((w, 3, r, e, s, o, u, r, c,e),3)==TruePrompt: Write function check element tupleAssesments: assert check_tuplex((w, 3 r, e, s, c, e),'r)==True assert check_tuplex( 3 ""e""),'5')==False assert check_tuplex(( 3""e""),3)==True",0.0,0.4079325096957339 |
| "Prompt: Write a python function to find the parity of a given number. Assesments: assert find_Parity(12) == ""Even Parity"", assert find_Parity(7) == ""Odd Parity"", assert find_Parity(10) == ""Even Parity""",58,0.033,31,1.8709677419354838,"Prompt: Write python function find parity numberAssesments: assert find_Parity(12) ""Even(7) ""Odd) ""Even Parity",0.0,0.32580374312721744 |
| "Prompt: Write a function to create the next bigger number by rearranging the digits of a given number. Assesments: assert rearrange_bigger(12)==21, assert rearrange_bigger(10)==False, assert rearrange_bigger(102)==120",54,0.032,26,2.076923076923077,Prompt: Write function create next number rearranging digits numberAssesments: assert rearrange_bigger(12)==21)==False,0.0,0.4941764085340913 |
| "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. Assesments: assert k_smallest_pairs([1,3,7],[2,4,6],2)==[[1, 2], [1, 4]], assert k_smallest_pairs([1,3,7],[2,4,6],1)==[[1, 2]], assert k_smallest_pairs([1,3,7],[2,4,6],7)==[[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [3, 6], [7, 2]]",152,0.033,92,1.6521739130434783,"Prompt: Write function find k pairs first secondAssesments: assert k_smallest_pairs([1,3,7][2,4,6],2)==[1, 2 [1,_smallest_pairs([1,3,7][2,4,6],1)==,([1,3,7[2,4,6],7)==[1, 2] [1, 4 [3, 2]]",0.0,0.14693534844668343 |
| "Prompt: Write a function to find the minimum product from the pairs of tuples within a given list. Assesments: assert min_product_tuple([(2, 7), (2, 6), (1, 8), (4, 9)] )==8, assert min_product_tuple([(10,20), (15,2), (5,10)] )==30, assert min_product_tuple([(11,44), (10,15), (20,5), (12, 9)] )==100",107,0.033,60,1.7833333333333334,"Prompt: Write function minimum tuples listAssesments: assert min_product_tuple, 7) (1 8) (4 9),20) (15,2) (5,10)(11,44) (10,15) (20,5) (12 9)",0.0,0.25416083589887123 |
| "Prompt: Write a function to find the minimum value in a given heterogeneous list. Assesments: assert min_val(['Python', 3, 2, 4, 5, 'version'])==2, assert min_val(['Python', 15, 20, 25])==15, assert min_val(['Python', 30, 20, 40, 50, 'version'])==20",85,0.033,43,1.9767441860465116,"Prompt: Write function find minimum value heterogeneous listAssesments: assert min_val'Python 3 2 4 5)==2 15 20 25 30, 20 40 50 |
| Prompt: Write a function to convert the given snake case string to camel case string by using regex. Assesments: assert snake_to_camel('android_tv') == 'AndroidTv', assert snake_to_camel('google_pixel') == 'GooglePixel', assert snake_to_camel('apple_watch') == 'AppleWatch' |
| Prompt: Write a python function to remove odd numbers from a given list. Assesments: assert remove_odd([1,2,3]) == [2], assert remove_odd([2,4,6]) == [2,4,6], assert remove_odd([10,20,3]) == [10,20]Prompt: Write python function remove odd numbers listAssesments: assert remove_odd([1,2,3][2,4,6][10,20,3] |
| Prompt: Write a function to extract the nth element from a given list of tuples. Assesments: assert 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'], assert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)] ,2)==[99, 96, 94, 98], assert extract_nth_element([('Greyson Fulton', 98, 99), ('Brady Kent', 97, 96), ('Wyatt Knott', 91, 94), ('Beau Turnbull', 94, 98)],1)==[98, 97, 91, 94]Prompt: Write function extract nth element list tuplesAssesments: assert extract_nth_element('Greyson Fulton 98, Kent 97, Knott 91, Turnbull 94, 98)'Greyson Fulton Kent Knott Turnbull extract_nth_element Fulton 98, Kent 97, Knott 91, Turnbull 94,, 96, 94, 98 assert extract_nth_element( Fulton 98, Kent 97, Knott 91, Turnbull 94,[98, 97, 91, 94] |
| Prompt: Write a python function to check whether the value exists in a sequence or not. Assesments: assert overlapping([1,2,3,4,5],[6,7,8,9]) == False, assert overlapping([1,2,3],[4,5,6]) == False, assert overlapping([1,4,5],[1,4,5]) == TruePrompt: Write python function check value sequenceAssesments: assert overlapping([1,2,3,4,5,8,9] False[1,2,3][4,5,6][1,4,5] True |
| Prompt: Write a python function to find a pair with highest product from a given array of integers. Assesments: assert max_Product([1,2,3,4,7,0,8,4]) == (7,8), assert max_Product([0,-1,-2,-4,5,0,-6]) == (-4,-6), assert max_Product([1,2,3]) == (2,3)Prompt: Write python function find highest product integersAssesments: assert max_Product([1,2,3,4,7,4,-1,-2-4,5,-6 (-4[1,2,3] (2,3) |
| 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. Assesments: assert breakSum(12) == 13, assert breakSum(24) == 27, assert breakSum(23) == 23Prompt: Write function find maximum sum dividing three summing givenAssesments: assert breakSum(12) == 13,(24) == 27,(23) 23 |
| Prompt: Write a function to find common first element in given list of tuple. Assesments: assert group_tuples([('x', 'y'), ('x', 'z'), ('w', 't')]) == [('x', 'y', 'z'), ('w', 't')], assert group_tuples([('a', 'b'), ('a', 'c'), ('d', 'e')]) == [('a', 'b', 'c'), ('d', 'e')], assert group_tuples([('f', 'g'), ('f', 'g'), ('h', 'i')]) == [('f', 'g', 'g'), ('h', 'i')]Prompt: Write function find common first element list tupleAssesments: assert group_tuples([('x', 'y 'z'), ('w' 't')] assert group_tuples([('a', 'b 'c ('d' 'e') assert group_tuples([('f', 'g'), ('h', 'i')] [('f' 'g |
| Prompt: Write a python function to find the sublist having maximum length. Assesments: assert Find_Max([['A'],['A','B'],['A','B','C']]) == ['A','B','C'], assert Find_Max([[1],[1,2],[1,2,3]]) == [1,2,3], assert Find_Max([[1,1],[1,2,3],[1,5,6,1]]) == [1,5,6,1]Prompt: Write python function find sublist maximum lengthAssesments: assert Find_Max('A' Find_Max(],3] [1,2,3] Find_Max([1,1],3],5,6,1] [1,5,6,1] |
| 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. Assesments: assert round_and_sum([22.4, 4.0, -16.22, -9.10, 11.00, -12.22, 14.20, -5.20, 17.50])==243, assert round_and_sum([5,2,9,24.3,29])==345, assert round_and_sum([25.0,56.7,89.2])==513Prompt: Write function round print total sum multiplied lengthAssesments: assert round_sum[22.4 4.0.22 -9.10 11.00.22 14.20 -5.20 17.50,2,24.3,29.0,56.7,89.2] |
| Prompt: Write a python function to find the cube sum of first n even natural numbers. Assesments: assert cube_Sum(2) == 72, assert cube_Sum(3) == 288, assert cube_Sum(4) == 800 |
| Prompt: Write a function to concatenate each element of tuple by the delimiter. Assesments: assert concatenate_tuple((ID, is, 4, UTS) ) == 'ID-is-4-UTS', assert concatenate_tuple((QWE, is, 4, RTY) ) == 'QWE-is-4-RTY', assert concatenate_tuple((ZEN, is, 4, OP) ) == 'ZEN-is-4-OP'Prompt: Write function concatenate element tuple delimiterAssesments: assert concatenate_tuple 4 'ID-is-4-UTS assert""QWE"", 4 ""RTY"")-is-4-RTY""ZEN"", 4 'ZEN-is-4-OP'",0.0,0.2561073127823758 |
| "Prompt: Write a python function to find the average of cubes of first n natural numbers. Assesments: assert find_Average_Of_Cube(2) == 4.5, assert find_Average_Of_Cube(3) == 12, assert find_Average_Of_Cube(1) == 1",68,0.032,31,2.193548387096774,Prompt: Write python function find average cubes first natural numbersAssesments: assert_Average_Cube(2) 4.5 12 1,0.0,0.5895199660536459 |
| "Prompt: Write a function to solve gold mine problem. Assesments: assert get_maxgold([[1, 3, 1, 5],[2, 2, 4, 1],[5, 0, 2, 3],[0, 6, 1, 2]],4,4)==16, assert get_maxgold([[10,20],[30,40]],2,2)==70, assert get_maxgold([[4,9],[3,7]],2,2)==13",107,0.033,57,1.8771929824561404,"Prompt: Write function solve gold mine problemAssesments: assert get_maxgold(, 3 5 4,4,4)==16_maxgold(,20,40]],2,2)==70_maxgold([4,9],7]],2,2)==13",0.0,0.33089300356965745 |
| "Prompt: Write a function to extract only the rear index element of each string in the given tuple. Assesments: assert extract_rear(('Mers', 'for', 'Vers') ) == ['s', 'r', 's'], assert extract_rear(('Avenge', 'for', 'People') ) == ['e', 'r', 'e'], assert extract_rear(('Gotta', 'get', 'go') ) == ['a', 't', 'o']",100,0.033,59,1.694915254237288,Prompt: Write function extract rear index element string tupleAssesments: assert extract_rear('Mers 'Vers' ['s' 'r extract_rear'Avenge'e 'r extract_rear'Gotta' 'get 'go' ['a' 't' 'o',0.0,0.1818772621402514 |
| "Prompt: Write a function to count the number of sublists containing a particular element. Assesments: assert count_element_in_list([[1, 3], [5, 7], [1, 11], [1, 15, 7]],1)==3, assert count_element_in_list([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']],'A')==3, assert count_element_in_list([['A', 'B'], ['A', 'C'], ['A', 'D', 'E'], ['B', 'C', 'D']],'E')==1",140,0.033,79,1.7721518987341771,"Prompt: Write function count sublists elementAssesments: assert count_element_in_list([1, 3] [5, 7] [1 11] 15, 7]] assert count_element_list('A', 'B' 'C' 'D' 'E')==3 count_element_list('A' 'B'] 'C' 'D' 'E'",0.0,0.2450197862307672 |
| "Prompt: Write a function to filter odd numbers using lambda function. Assesments: assert filter_oddnumbers([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[1,3,5,7,9], assert filter_oddnumbers([10,20,45,67,84,93])==[45,67,93], assert filter_oddnumbers([5,7,9,8,6,4,3])==[5,7,9,3]",120,0.033,64,1.875,"Prompt: Write function filter odd numbers lambdaAssesments: assert filter_oddnumbers[1,3,5,7,9,20,45,67,84,93][45,67,93[5,7,9,8,6,4[5,7,9,3]",0.0,0.3291001959137979 |
| "Prompt: Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format by using regex. Assesments: assert change_date_format(""2026-01-02"") == '02-01-2026', assert change_date_format(""2020-11-13"") == '13-11-2020', assert change_date_format(""2021-04-26"") == '26-04-2021'",90,0.033,52,1.7307692307692308,"Prompt: Write function convert date yyyy-mm-dd dd-mm-yyyy regexAssesments: assert change_date_format""2026-01-02"")""2020-11-13"")""2021-04-26"") '26-04-2021 |
| Prompt: Write a function to sort the given array by using shell sort. Assesments: assert shell_sort([12, 23, 4, 5, 3, 2, 12, 81, 56, 95]) == [2, 3, 4, 5, 12, 12, 23, 56, 81, 95], assert shell_sort([24, 22, 39, 34, 87, 73, 68]) == [22, 24, 34, 39, 68, 73, 87], assert shell_sort([32, 30, 16, 96, 82, 83, 74]) == [16, 30, 32, 74, 82, 83, 96]Prompt: Write function sort array shell sortAssesments: assert shell_sort([12, 23, 4 5 3 2 12 81 56 95 56 81 95([24, 22, 39 34 87 73 68 39[32 30 16 96 82 83 74 30 32 74 82 83 |
| Prompt: Write a function to extract the elementwise and tuples from the given two tuples. Assesments: assert and_tuples((10, 4, 6, 9), (5, 2, 3, 3)) == (0, 0, 2, 1), assert and_tuples((1, 2, 3, 4), (5, 6, 7, 8)) == (1, 2, 3, 0), assert and_tuples((8, 9, 11, 12), (7, 13, 14, 17)) == (0, 9, 10, 0)Prompt: Write function extract elementwise tuples tuplesAssesments:((10, 4, 6, 9) (5 2 3, 3) 1) 2 3 4) (5 6 7 8)(8, 9 11 (7, 13, 14 17 10 0 |
| Prompt: Write a function to find the directrix of a parabola. Assesments: assert parabola_directrix(5,3,2)==-198, assert parabola_directrix(9,8,4)==-2336, assert parabola_directrix(2,4,6)==-130Prompt: Write function find directrix parabolaAssesments: assert,3,2)==-198,4)==-2336,4,6-130 |
| Prompt: Write a function that takes two lists and returns true if they have at least one common element. Assesments: assert common_element([1,2,3,4,5], [5,6,7,8,9])==True, assert common_element([1,2,3,4,5], [6,7,8,9])==None, assert common_element(['a','b','c'], ['d','b','e'])==TruePrompt: Write function two lists returns true common elementAssesments: assert common_element([1,2,3,4,5,7,8,9,3,4,5,8,9 assert(['a'b'c'd'b'e |
| Prompt: Write a function to find the median of a trapezium. Assesments: assert median_trapezium(15,25,35)==20, assert median_trapezium(10,20,30)==15, assert median_trapezium(6,9,4)==7.5Prompt: Write function find median trapeziumAssesments: assert(15,25,35)==20,20(6,9,4)==7.5 |
| Prompt: Write a function to check whether the entered number is greater than the elements of the given array. Assesments: assert check_greater([1, 2, 3, 4, 5], 4) == 'No, entered number is less than those in the array', assert check_greater([2, 3, 4, 5, 6], 8) == 'Yes, the entered number is greater than those in the array', assert check_greater([9, 7, 4, 8, 6, 1], 11) == 'Yes, the entered number is greater than those in the array' |
| Prompt: Write a function that matches a string that has an a followed by one or more b's. Assesments: assert text_match_one(""ac"")==('Not matched!'), assert text_match_one(""dc"")==('Not matched!'), assert text_match_one(""abba"")==('Found a match!')",62,0.033,33,1.878787878787879,"Prompt: Write function matches string a followed b'sAssesments: assert text_match_one(ac)== matcheddc)== matchedabba)=='Found match!' |
| Prompt: Write a python function to find the last digit of a given number. Assesments: assert last_Digit(123) == 3, assert last_Digit(25) == 5, assert last_Digit(30) == 0 |
| Prompt: Write a python function to print negative numbers in a list. Assesments: assert neg_nos([-1,4,5,-6]) == -1,-6, assert neg_nos([-1,-2,3,4]) == -1,-2, assert neg_nos([-7,-6,8,9]) == -7,-6Prompt: Write python function print negative numbers listAssesments: assert,4,5,-6 -1,-6,-2,3,4 -1,-6,8,9 -7 |
| Prompt: Write a function to remove odd characters in a string. Assesments: assert remove_odd(python)==(yhn), assert remove_odd(program)==(rga), assert remove_odd(language)==(agae)Prompt: Write function remove odd characters stringAssesments: assert remove_oddyhn),agae) |
| Prompt: Write a function to count bidirectional tuple pairs. Assesments: assert count_bidirectional([(5, 6), (1, 2), (6, 5), (9, 1), (6, 5), (2, 1)] ) == '3', assert count_bidirectional([(5, 6), (1, 3), (6, 5), (9, 1), (6, 5), (2, 1)] ) == '2', assert count_bidirectional([(5, 6), (1, 2), (6, 5), (9, 2), (6, 5), (2, 1)] ) == '4'Prompt: Write function count bidirectional pairsAssesments: assert count_bidirectional 6) (1 2) (6 5) (9, 1) (2 '3, 6) (1 3) (6 5) (9 (2 1) '2 6) (1 (6 (9 (2 '4",0.0,0.44219050284541456 |
| "Prompt: Write a function to convert a list of multiple integers into a single integer. Assesments: assert multiple_to_single([11, 33, 50])==113350, assert multiple_to_single([-1,2,3,4,5,6])==-123456, assert multiple_to_single([10,15,20,25])==10152025",76,0.033,40,1.9,"Prompt: Write function convert multiple integers singleAssesments: assert multiple_to_single( 33 50)==113350-1,2,3,4[10,15,20,25",0.0,0.34953820319059603 |
| "Prompt: Write a function to find all adverbs and their positions in a given sentence. Assesments: assert find_adverb_position(""clearly!! we can see the sky"")==(0, 7, 'clearly'), assert find_adverb_position(""seriously!! there are many roses"")==(0, 9, 'seriously'), assert find_adverb_position(""unfortunately!! sita is going to home"")==(0, 13, 'unfortunately')",96,0.035,49,1.9591836734693877,"Prompt: Write function find adverbs positions sentenceAssesments: assert find_adverb_position( see sky"")==(0, 7, many roses"")==(0, 9, sita going(0, 13, 'unfortunately'",0.0,0.3979220571519959 |
| "Prompt: Write a function to find the surface area of a cube. Assesments: assert surfacearea_cube(5)==150, assert surfacearea_cube(3)==54, assert surfacearea_cube(10)==600",44,0.033,22,2.0,Prompt: Write function find surface area cubeAssesments: assert surfacearea_cube(5)==150)==600,0.0,0.43129023229778896 |
| "Prompt: Write a function to find the ration of positive numbers in an array of integers. Assesments: assert positive_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.54, assert positive_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.69, assert positive_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.56",150,0.034,66,2.272727272727273,"Prompt: Write function find ration positive numbers integersAssesments: assert positive_count 1 2 -1 -5 6 -3 -2 3, 4 6, 8 -1 -5 6 4 -3 6 8 4 -6 11 14 -5 17",0.0,0.6542503116810423 |
| "Prompt: Write a python function to find the largest negative number from the given list. Assesments: assert largest_neg([1,2,3,-4,-6]) == -6, assert largest_neg([1,2,3,-8,-9]) == -9, assert largest_neg([1,2,3,4,-1]) == -1",74,0.033,42,1.7619047619047619,"Prompt: Write python function largest negative number listAssesments: assert_neg,3,-4,-6 -6,3,-8,-9[1,2,3,4,-1] -1",0.0,0.23664254394732978 |
| "Prompt: Write a function to trim each tuple by k in the given tuple list. Assesments: assert 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,)]', assert 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)]', assert 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)]'",287,0.034,149,1.9261744966442953,"Prompt: Write function trim tupleAssesments: assert trim, 3, 2, 1 4) (3, 4, 9 2, 5) (4, 8 2, 1, 7), 3, 2, 1, 4) (3, 4, 9 2 (9,, 5) (4, 8 2, 1 7) (4 9 (8(7, 8 4, 9) (11, 8 12, 4), 1, 7, 8) (3, 6, 9, 7)(8 (8 (1 (6",0.0,0.3709363853059016 |
| "Prompt: Write a function to perform index wise multiplication of tuple elements in the given two tuples. Assesments: assert 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)), assert 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)), assert 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))",260,0.034,127,2.047244094488189,"Prompt: Write function multiplication elements tuplesAssesments: assert index, 3) (4, (2,, 7) (3,, (7, 3), (12, (2, (7, 30, 4) (5, 6) (3, (2, 11, 8) (4, (8,, (20, (6, (16, 44, 5) (6, 7) (4, (3, 12, (5, (3, (9,, (30, 77), (12, (27, 60",0.0,0.4699132381752028 |
| "Prompt: Write a python function to count the occurence of all elements of list in a tuple. Assesments: assert count_Occurrence(('a', 'a', 'c', 'b', 'd'),['a', 'b'] ) == 3, assert count_Occurrence((1, 2, 3, 1, 4, 6, 7, 1, 4),[1, 4, 7]) == 6, assert count_Occurrence((1,2,3,4,5,6),[1,2]) == 2",126,0.033,70,1.8,"Prompt: Write python function count elements list tupleAssesments: assert count_Occurrence(('a == 3_Occurrence((1, 2, 3 4 6, 7 4) == 6_Occurrence((1,2,3,4,5,6),[1,2]) 2 |
| Prompt: Write a function to find cubes of individual elements in a list using lambda function. Assesments: assert cube_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000], assert cube_nums([10,20,30])==([1000, 8000, 27000]), assert cube_nums([12,15])==([1728, 3375])Prompt: Write function find cubes elements list lambdaAssesments: assert cube_nums 5 8 9 10 8 27, 64 125 216 343 512 729 1000,20,30 8000 27000,15[1728 3375 |
| Prompt: Write a function to calculate the sum of perrin numbers. Assesments: assert cal_sum(9) == 49, assert cal_sum(10) == 66, assert cal_sum(11) == 88 |
| Prompt: Write a python function to check whether the triangle is valid or not if 3 points are given. Assesments: assert check_Triangle(1,5,2,5,4,6) == 'Yes', assert check_Triangle(1,1,1,4,1,5) == 'No', assert check_Triangle(1,1,1,1,1,1) == 'No'Prompt: Write python function check triangle valid 3 pointsAssesments: assert check_Triangle(1,5,2,5,4,6) 'Yes,1,1,4,1,5) 'No,1 |
| Prompt: Write a function to extract specified size of strings from a give list of string values. Assesments: assert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,8)==['practice', 'solution'], assert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,6)==['Python'], assert extract_string(['Python', 'list', 'exercises', 'practice', 'solution'] ,9)==['exercises']Prompt: Write function extract size strings from list valuesAssesments: assert extract_string(['Python' 'list 'exercises 'practice 'solution'],8)==['practice'] assert extract ,6)==['Python'] assert extract_string(,9)==['exercises']",0.0,0.34045464440090795 |
| "Prompt: Write a function to remove all whitespaces from the given string using regex. Assesments: assert remove_whitespaces(' Google Flutter ') == 'GoogleFlutter', assert remove_whitespaces(' Google Dart ') == 'GoogleDart', assert remove_whitespaces(' iOS Swift ') == 'iOSSwift'",69,0.033,33,2.090909090909091,Prompt: Write function remove whitespaces string regexAssesments: assert remove_whitespaces( Google Flutter == Google Dart iOS Swift == 'iOSSwift',0.0,0.5056102587588732 |
| "Prompt: Write a function that gives loss amount if the given amount has loss else return none. Assesments: assert loss_amount(1500,1200)==None, assert loss_amount(100,200)==100, assert loss_amount(2000,5000)==3000",57,0.033,36,1.5833333333333333,"Prompt: Write function loss return noneAssesments: assert loss(1500,1200)==None(100,200)==100(2000,5000)==3000",0.0,0.09065677768448539 |
| "Prompt: Write a python function to find the sum of even factors of a number. Assesments: assert sumofFactors(18) == 26, assert sumofFactors(30) == 48, assert sumofFactors(6) == 8",53,0.033,25,2.12,"Prompt: Write python function find sum even factors numberAssesments: assert) 26,(30) 48 8",0.0,0.5293926672264204 |
| "Prompt: Write a function that matches a word containing 'z'. Assesments: assert text_match_wordz(""pythonz."")==('Found a match!'), assert text_match_wordz(""xyz."")==('Found a match!'), assert text_match_wordz("" lang ."")==('Not matched!')",64,0.033,32,2.0,"Prompt: Write function matches word 'z'Assesments: assert text_match_wordz""pythonz'Found match!xyz'Found match lang matched!' |
| Prompt: Write a function to check whether the given month number contains 31 days or not. Assesments: assert check_monthnumb_number(5)==True, assert check_monthnumb_number(2)==False, assert check_monthnumb_number(6)==False |
| Prompt: Write a function to reverse strings in a given list of string values. Assesments: assert reverse_string_list(['Red', 'Green', 'Blue', 'White', 'Black'])==['deR', 'neerG', 'eulB', 'etihW', 'kcalB'], assert reverse_string_list(['john','amal','joel','george'])==['nhoj','lama','leoj','egroeg'], assert reverse_string_list(['jack','john','mary'])==['kcaj','nhoj','yram'] |
| Prompt: Write a python function to find the sublist having minimum length. Assesments: assert Find_Min([[1],[1,2],[1,2,3]]) == [1], assert Find_Min([[1,1],[1,1,1],[1,2,7,8]]) == [1,1], assert Find_Min([['x'],['x','y'],['x','y','z']]) == ['x']Prompt: Write python function find sublist minimum lengthAssesments: assert Find_Min([[1][1,2],3]([1,1],7,8]] Find_Min([['x']','y']'z']] ['x |
| Prompt: Write a function to find the area of a rectangle. Assesments: assert rectangle_area(10,20)==200, assert rectangle_area(10,5)==50, assert rectangle_area(4,2)==8Prompt: Write function find area rectangleAssesments: assert,20)==200,5)==50,2)==8 |
| Prompt: Write a function to remove uppercase substrings from a given string by using regex. Assesments: assert remove_uppercase('cAstyoUrFavoRitETVshoWs') == 'cstyoravoitshos', assert remove_uppercase('wAtchTheinTernEtrAdIo') == 'wtchheinerntrdo', assert remove_uppercase('VoicESeaRchAndreComMendaTionS') == 'oiceachndreomendaion' |
| Prompt: Write a python function to get the first element of each sublist. Assesments: assert Extract([[1, 2], [3, 4, 5], [6, 7, 8, 9]]) == [1, 3, 6], assert Extract([[1,2,3],[4, 5]]) == [1,4], assert Extract([[9,8,1],[1,2]]) == [9,1]Prompt: Write python function first element sublistAssesments: assert Extract 2 4 5 7 8 [1 3 6 Extract[1,2,3] [1,4,1] [9,1] |
| Prompt: Write a python function to count the upper case characters in a given string. Assesments: assert upper_ctr('PYthon') == 1, assert upper_ctr('BigData') == 1, assert upper_ctr('program') == 0 |
| Prompt: Write a function to find all possible combinations of the elements of a given list. Assesments: assert 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']], assert 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']], assert 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']]Prompt: Write function find combinations elements list.Assesments: assert combinations_list(['orange' 'red' 'green' 'blue']'orange''red''green'' 'orange'', 'red''blue'', 'orange'', 'red', 'orange'', 'green' 'orange''blue', 'green', 'red'] 'red' 'orange assert combinations_list(['red' 'green' 'blue' 'white' 'black' 'orange']'red' ['green'', 'red']'blue'', 'red'', 'green' 'red''white''white', 'red'', 'green'', 'red'', 'blue' 'blue', 'red' 'blue', 'green' 'green' 'red''black''black', 'red''black', 'green'', 'green', 'red'', 'blue'' 'blue', 'red' 'blue' 'green' 'green', 'red''black', 'white''red'black' 'white' 'green'' 'white' 'green' 'red' 'white' 'blue' 'white 'blue' 'red' 'white 'blue 'green' 'green 'red''orange''orange' 'red' 'green' 'red''orange' 'blue' 'red''orange' 'blue' 'green' 'red''orange' 'white''orange' 'white' 'red' 'white' 'green' 'red''orange' 'white' 'blue' 'white 'blue' 'red'' 'white 'blue 'green' 'green 'red''orange' 'black'' 'black' 'red'' 'black' 'green' 'black 'green' 'red''orange' 'black' 'blue'' 'black 'blue' 'red''orange' 'black 'blue' 'green' 'blue 'green 'red''orange' 'black' 'white''orange' 'black 'white'red''orange' 'black 'white 'green' 'red''orange 'black 'white 'blue' 'white 'blue 'red''orange 'black 'white 'blue 'green''orange 'black 'green 'red assert combinations_list(['red' 'green' 'black' 'orange''red''green' 'red''black''black' 'red' 'green''orange''orange' 'red' 'green''orange' 'green' 'red''orange 'black''orange' 'black' 'red''orange' 'black' 'green''orange' 'black 'green 'red",0.01,0.1481800925880549 |
| "Prompt: Write a function to find the maximum product subarray of the given array. Assesments: assert max_subarray_product([1, -2, -3, 0, 7, -8, -2]) == 112, assert max_subarray_product([6, -3, -10, 0, 2]) == 180 , assert max_subarray_product([-2, -40, 0, -2, -3]) == 80",98,0.033,50,1.96,"Prompt: Write function find maximum product arrayAssesments: assert max([1, -2, -3 7 -8 -2] 112[6, -3 2 180[-2, -2 -3] 80",0.0,0.39858942065491176 |
| "Prompt: Write a function to check if all values are same in a dictionary. Assesments: assert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},10)==False, assert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},12)==True, assert check_value({'Cierra Vega': 12, 'Alden Cantrell': 12, 'Kierra Gentry': 12, 'Pierre Cox': 12},5)==False",139,0.036,67,2.074626865671642,"Prompt: Write function check values same dictionaryAssesments: assert check_value('Cierra Vega Cantrell 'Kierra Gentry Cox 12,10)==False assert Vega Cantrell 'Kierra Gentry Cox 12,12)==True assert check_value('Cierra Vega Cantrell Gentry Cox 12,5)==False",0.0,0.4922992092434552 |
| "Prompt: Write a function to drop empty items from a given dictionary. Assesments: assert drop_empty({'c1': 'Red', 'c2': 'Green', 'c3':None})=={'c1': 'Red', 'c2': 'Green'}, assert drop_empty({'c1': 'Red', 'c2': None, 'c3':None})=={'c1': 'Red'}, assert drop_empty({'c1': None, 'c2': 'Green', 'c3':None})=={ 'c2': 'Green'}",117,0.033,58,2.0172413793103448,Prompt: Write function drop empty items dictionaryAssesments: assert drop_empty('c1 'c2 'Green 'c3':None drop_empty'c1 'c2 None 'c3':None drop_empty None 'c2 'Green 'c3:None 'Green',0.0,0.4453854097300635 |
| "Prompt: Write a function to find the peak element in the given array. Assesments: assert find_peak([1, 3, 20, 4, 1, 0], 6) == 2, assert find_peak([2, 3, 4, 5, 6], 5) == 4, assert find_peak([8, 9, 11, 12, 14, 15], 6) == 5",99,0.033,51,1.9411764705882353,Prompt: Write function find peak arrayAssesments: assert find_peak( 3 20 4 6) 3 4 5 6 5)_peak 9 11 12 14 15 6) 5,0.0,0.3832008034112049 |
| "Prompt: Write a python function to convert decimal number to octal number. Assesments: assert decimal_to_Octal(10) == 12, assert decimal_to_Octal(2) == 2, assert decimal_to_Octal(33) == 41",54,0.033,29,1.8620689655172413,Prompt: Write python function convert decimal octalAssesments: assert decimal_Octal(10) 12 2(33) 41,0.0,0.3185288128395919 |
| "Prompt: Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array. Assesments: assert max_product([3, 100, 4, 5, 150, 6], 6) == 45000 , assert max_product([4, 42, 55, 68, 80], 5) == 50265600, assert max_product([10, 22, 9, 33, 21, 50, 41, 60], 8) == 21780000",118,0.033,64,1.84375,"Prompt: Write function maximum product multiplying arrayAssesments: assert max_product( 100 4 5 150 6 45000 42 55 68 80 50265600 22, 9 33 21, 50 41 60 8) 21780000",0.0,0.3035526868178001 |
| "Prompt: Write a function to find the maximum profit earned from a maximum of k stock transactions Assesments: assert max_profit([1, 5, 2, 3, 7, 6, 4, 5], 3) == 10, assert max_profit([2, 4, 7, 5, 4, 3, 5], 2) == 7, assert max_profit([10, 6, 8, 4, 2], 2) == 2",111,0.033,56,1.9821428571428572,Prompt: Write function find maximum profit stock transactionsAssesments: assert max_profit( 5 2 3 7 6 4 5 3) 10 4 7 5 7[10 6 8 4 2 2,0.0,0.41669165567150457 |
| "Prompt: Write a function to find the pairwise addition of the elements of the given tuples. Assesments: assert add_pairwise((1, 5, 7, 8, 10)) == (6, 12, 15, 18), assert add_pairwise((2, 6, 8, 9, 11)) == (8, 14, 17, 20), assert add_pairwise((3, 7, 9, 10, 12)) == (10, 16, 19, 22)",119,0.034,60,1.9833333333333334,"Prompt: Write function find tuplesAssesments: assert add((1 5 7 8 10 (6 12 15 6 8 9 11 (8 14 17, 7 9 10 12 (10 16 19, 22",0.0,0.41766489411325686 |
| "Prompt: Write a python function to find remainder of array multiplication divided by n. Assesments: assert find_remainder([ 100, 10, 5, 25, 35, 14 ],6,11) ==9, assert find_remainder([1,1,1],3,1) == 0, assert find_remainder([1,2,1],3,2) == 0",87,0.033,45,1.9333333333333333,"Prompt: Write python function find array multiplication divided nAssesments: assert_remainder 100 10 5 25 35 14,6,11),1,3,1) 0,2)",0.0,0.3767888795596604 |
| "Prompt: Write a python function to check whether the given list contains consecutive numbers or not. Assesments: assert check_Consecutive([1,2,3,4,5]) == True, assert check_Consecutive([1,2,3,5,6]) == False, assert check_Consecutive([1,2,1]) == False",74,0.033,43,1.7209302325581395,"Prompt: Write python function check list consecutive numbersAssesments: assert check_Consecutive[1,2,3,4,5 True,3,5,6 False[1,2,1]",0.0,0.20314503478934376 |
| "Prompt: Write a function to find the tuple intersection of elements in the given tuple list irrespective of their order. Assesments: assert tuple_intersection([(3, 4), (5, 6), (9, 10), (4, 5)] , [(5, 4), (3, 4), (6, 5), (9, 11)]) == {(4, 5), (3, 4), (5, 6)}, assert tuple_intersection([(4, 1), (7, 4), (11, 13), (17, 14)] , [(1, 4), (7, 4), (16, 12), (10, 13)]) == {(4, 7), (1, 4)}, assert tuple_intersection([(2, 1), (3, 2), (1, 3), (1, 4)] , [(11, 2), (2, 3), (6, 2), (1, 3)]) == {(1, 3), (2, 3)}",230,0.034,130,1.7692307692307692,"Prompt: Write function find intersectionAssesments: assert tuple_intersection, 4) (5, 6) (9, (4, 5), 4) (3, 4) (6, 5) (9, 11), 1) (7, 4) (11, (17, 14), 4) (16, (10, 13) (1, 4), 1) (3, 2) (1, 3) (1, 4)(11, 2) (2, (6, 2) (1 3)",0.0,0.24263170358888234 |
| "Prompt: Write a function to replace characters in a string. Assesments: assert replace_char(""polygon"",'y','l')==(""pollgon""), assert replace_char(""character"",'c','a')==(""aharaater""), assert replace_char(""python"",'l','a')==(""python"")",60,0.033,33,1.8181818181818181,"Prompt: Write function replace characters stringAssesments: assert replace_char(""polygon"",'y'""pollgon""),""character"",'apython,'l''a' |
| Prompt: Write a function to sort counter by value. Assesments: assert sort_counter({'Math':81, 'Physics':83, 'Chemistry':87})==[('Chemistry', 87), ('Physics', 83), ('Math', 81)], assert sort_counter({'Math':400, 'Physics':300, 'Chemistry':250})==[('Math', 400), ('Physics', 300), ('Chemistry', 250)], assert sort_counter({'Math':900, 'Physics':1000, 'Chemistry':1250})==[('Chemistry', 1250), ('Physics', 1000), ('Math', 900)] |
| Prompt: Write a python function to find the sum of the largest and smallest value in a given array. Assesments: assert big_sum([1,2,3]) == 4, assert big_sum([-1,2,3,4]) == 3, assert big_sum([2,3,6]) == 8Prompt: Write python function largest smallest arrayAssesments: assert big_sum[1,2,3] 4[-1,2,3,4] 3[2,3,6] 8 |
| Prompt: Write a python function to convert the given string to lower case. Assesments: assert is_lower(InValid) == invalid, assert is_lower(TruE) == true, assert is_lower(SenTenCE) == sentencePrompt: Write python function convert string lower caseAssesments: assertInValid) ==TruE)SenTenCE) == |
| Prompt: Write a function to remove lowercase substrings from a given string. Assesments: assert remove_lowercase(PYTHon)==('PYTH'), assert remove_lowercase(FInD)==('FID'), assert remove_lowercase(STRinG)==('STRG') |
| Prompt: Write a python function to find the first digit of a given number. Assesments: assert first_Digit(123) == 1, assert first_Digit(456) == 4, assert first_Digit(12) == 1 |
| Prompt: Write a python function to find the maximum occurring character in a given string. Assesments: assert get_max_occuring_char(data) == a, assert get_max_occuring_char(create) == e, assert get_max_occuring_char(brilliant girl) == iPrompt: Write python function find maximum character stringAssesments: assert_max_char(data) == a,create)brilliant girl) i |
| Prompt: Write a function to determine if there is a subset of the given set with sum equal to the given sum. Assesments: assert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 9) == True, assert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 30) == False, assert is_subset_sum([3, 34, 4, 12, 5, 2], 6, 15) == TruePrompt: Write function determine subset set sum equalAssesments: assert_subset_sum([3, 34, 4, 12, 5, 2] 6, 9) True 6, 30) False_sum( 34 12 5 2 6, 15) True |
| Prompt: Write a function to find sequences of one upper case letter followed by lower case letters in the given string by using regex. Assesments: assert match(Geeks) == 'Yes', assert match(geeksforGeeks) == 'Yes', assert match(geeks) == 'No'Prompt: Write function find sequences upper case letter lower case letters string regexAssesments: assert matchGeeks) 'Yes' 'Yes' 'No' |
| Prompt: Write a python function to find the first natural number whose factorial is divisible by x. Assesments: assert first_Factorial_Divisible_Number(10) == 5, assert first_Factorial_Divisible_Number(15) == 5, assert first_Factorial_Divisible_Number(5) == 4 |
| Prompt: Write a function to remove the matching tuples from the given two tuples. Assesments: assert remove_matching_tuple([('Hello', 'dude'), ('How', 'are'), ('you', '?')], [('Hello', 'dude'), ('How', 'are')]) == [('you', '?')], assert remove_matching_tuple([('Part', 'of'), ('the', 'journey'), ('is ', 'end')], [('Journey', 'the'), ('is', 'end')]) == [('Part', 'of'), ('the', 'journey'), ('is ', 'end')], assert remove_matching_tuple([('Its', 'been'), ('a', 'long'), ('day', 'without')], [('a', 'long'), ('my', 'friend')]) == [('Its', 'been'), ('day', 'without')]Prompt: Write function remove matching tuples two tuplesAssesments: assert remove_matching_tuple([('Hello', 'dude'How', 'are'you', '?')] remove_matching_tuple('Part', 'of'),'the' 'journey'is 'end') assert remove_matching_tuple([('Its', 'been'), ('a', 'long'), ('day', 'without')] [( ('my', 'friend')] [('Its' 'been'day' 'without']",0.0,0.32580374312721744 |
| "Prompt: Write a function to find the largest palindromic number in the given array. Assesments: assert largest_palindrome([1, 232, 54545, 999991], 4) == 54545, assert largest_palindrome([1, 2, 3, 4, 5, 50], 6) == 5, assert largest_palindrome([1, 3, 7, 9, 45], 5) == 9",104,0.033,53,1.9622641509433962,Prompt: Write function find largest palindromic arrayAssesments: assert largest_palindrome( 232 54545 999991] 54545( 2 3 4 5 50 5 3 7 9 45,0.0,0.40044040999318786 |
| "Prompt: Write a function to compute binomial probability for the given number. Assesments: assert binomial_probability(10, 5, 1.0/3) == 0.13656454808718185, assert binomial_probability(11, 6, 2.0/4) == 0.2255859375, assert binomial_probability(12, 7, 3.0/5) == 0.227030335488",98,0.033,52,1.8846153846153846,Prompt: Write function compute binomial probability numberAssesments: 5 1.0/3 6 2.0/4 0.2255859375 7 3.0/5) 0.227030335488,0.0,0.33696096794333563 |
| "Prompt: Write a function to sort a list of tuples in increasing order by the last element in each tuple. Assesments: assert sort_tuple([(1, 3), (3, 2), (2, 1)] ) == [(2, 1), (3, 2), (1, 3)], assert sort_tuple([(2, 4), (3, 3), (1, 1)] ) == [(1, 1), (3, 3), (2, 4)], assert sort_tuple([(3, 9), (6, 7), (4, 3)] ) == [(4, 3), (6, 7), (3, 9)]",149,0.033,88,1.6931818181818181,"Prompt: Write function sort tuples last elementAssesments: assert sort_tuple([(1, 3) (3, 2) (2, 1), 1)_tuple, 4) (3, 3) (1, 1) sort_tuple[(3, 9) (6, 7) (4, 3), 3) (6, 7) (3, 9)",0.0,0.18046014299162905 |
| "Prompt: Write a function to find the area of a pentagon. Assesments: assert area_pentagon(5)==43.01193501472417, assert area_pentagon(10)==172.0477400588967, assert area_pentagon(15)==387.10741513251753",65,0.033,31,2.096774193548387,Prompt: Write function find area pentagonAssesments: assert)==172.0477400588967(15)==387.10741513251753,0.0,0.5104050991757174 |
| "Prompt: Write a python function to find the frequency of the largest value in a given array. Assesments: assert frequency_Of_Largest(5,[1,2,3,4,4]) == 2, assert frequency_Of_Largest(3,[5,6,5]) == 1, assert frequency_Of_Largest(4,[2,7,7,7]) == 3",85,0.034,45,1.8888888888888888,"Prompt: Write python function largest value arrayAssesments: assert frequency,[1,2,3,4,4]) 2,[5,6,5]) 1,[2,7,7,7])",0.0,0.34045464440090795 |
| "Prompt: Write a function to extract all the pairs which are symmetric in the given tuple list. Assesments: assert extract_symmetric([(6, 7), (2, 3), (7, 6), (9, 8), (10, 2), (8, 9)] ) == {(8, 9), (6, 7)}, assert extract_symmetric([(7, 8), (3, 4), (8, 7), (10, 9), (11, 3), (9, 10)] ) == {(9, 10), (7, 8)}, assert extract_symmetric([(8, 9), (4, 5), (9, 8), (11, 10), (12, 4), (10, 11)] ) == {(8, 9), (10, 11)}",185,0.034,105,1.7619047619047619,"Prompt: Write function extract pairs symmetric listAssesments: assert extract_symmetric, 7) (2, 3) (7, 6) (9, 8) (10, 2) (8, 9)(8(7, 8) (3, 4) (8, 7) (10, (11, 3) 10(8, (4, 5) (9, (11 (12, 4) (10, 11",0.0,0.23664254394732978 |
| "Prompt: Write a function to find the sum of geometric progression series. Assesments: assert sum_gp(1,5,2)==31, assert sum_gp(1,5,4)==341, assert sum_gp(2,6,3)==728",53,0.033,29,1.8275862068965518,"Prompt: Write function find sum geometricAssesments: assert sum(1,5,2)==31,4)==341,3)==728",0.0,0.29033845797504276 |
| "Prompt: Write a function to search an element in the given array by using binary search. Assesments: assert binary_search([1,2,3,5,8], 6) == False, assert binary_search([7, 8, 9, 10, 13], 10) == True, assert binary_search([11, 13, 14, 19, 22, 36], 23) == False",92,0.033,47,1.9574468085106382,"Prompt: Write function search array binary searchAssesments: assert binary_search(,3 6) False 8 9 10 13 True 13, 14 19, 22, 36 23 False",0.0,0.3965021348053664 |
| "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. Assesments: assert 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)]], assert 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)]], assert 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)]]",2216,0.142,1185,1.870042194092827,"Prompt: Write function calculate hexagon coordinates returns 6 tuples x y coordinatesAssesments: assert calculate_polygons(1,1 4-5.0 -4.196152422706632)-5.0 -0.7320508075688767)-2.0 -4-2.0 -5.928203230275509)-5.0 -4.196152422706632) -0.7320508075688767) (4.0 -4 -5.928203230275509) -4 -0.7320508075688767) (10.0 (13.0 -0.7320508075688767) (13.0 -4.196152422706632) (10.0 -5.928203230275509) (7.0 -4.196152422706632)-2.0 1.0000000000000004) 4.464101615137755) 1.0000000000000004) -0.7320508075688767)-2.0 1.0000000000000004) 4.464101615137755) 6.196152422706632) 4.464101615137755) 1.0000000000000004) -0.7320508075688767)-5.0 6.196152422706632)-5.0 9.660254037844387)-2.0 11.392304845413264) 9.660254037844387)-2.0 4.464101615137755)-5.0 6.196152422706632) 6.196152422706632) 9.660254037844387) 11.392304845413264) 9.660254037844387) 6.196152422706632) 4.464101615137755) 6.196152422706632) 6.196152422706632) 9.660254037844387) 11.392304845413264) 6.196152422706632) 4.464101615137755) 6.196152422706632)-2.0 11.392304845413264)-2.0 16.588457268119896) 11.392304845413264) 9.660254037844387)-2.0 11.392304845413264) 11.392304845413264) 16.588457268119896) 14.85640646055(10.0 11.392304845413264) (7.0 9.660254037844387) (4.0 calculate_polygons(5,4,7,9,8(-11.0 -9.856406460551018) -0.6188021535170058)-3.0 -0.6188021535170058) -9-3.0 -14.475208614068023) -0.6188021535170058) (13.0 (21.0 -0.6188021535170058) (21.0 -0.6188021535170058) (29.0 (37.0 -0.6188021535170058) -14.475208614068023)-3.0-3.0 13.237604307034012) (5.0 17.856406460551018) (13.0 13.237604307034012) (5.0 -0.6188021535170058)-3.0 4.0 13.237604307034012) (21.0 17.856406460551018) (29.0 13.237604307034012)(21.0 -0.6188021535170058) (13.0 17.856406460551018) 27.09401076758503)-3.0 31.712812921102035) 27.09401076758503)-3.0 13.237604307034012) 27.09401076758503) (13.0 31.712812921102035) (21.0 27.09401076758503).0 31.712812921102035) (37.0 27.09401076758503) 17.856406460551018) 13.237604307034012) (21.0 17.856406460551018)-3.0 31.712812921102035)-3.0 40.95041722813605) 45.569219381653056) (13.0 40.95041722813605) (13.0 31.712812921102035) 27.09401076758503)-3.0 31.712812921102035) 31.712812921102035).95041722813605) (21.0 45.569219381653056).0.95041722813605) 31.712812921102035) (21.0 27.09401076758503) (13.0 calculate_polygons(9,6,4,3(5.02.5358983848622456 6.0) 8.309401076758503) (9 9.464101615137753) (11.0 8.309401076758503) 6.0) (9.0 4.8452994616207485),",0.02,0.3250470889854876 |
| "Prompt: Write a function to convert the given binary tuple to integer. Assesments: assert binary_to_integer((1, 1, 0, 1, 0, 0, 1)) == '105', assert binary_to_integer((0, 1, 1, 0, 0, 1, 0, 1)) == '101', assert binary_to_integer((1, 1, 0, 1, 0, 1)) == '53'",105,0.034,50,2.1,"Prompt: Write function convert binary tuple integerAssesments: assert binary_to_integer((1, 1, 0 1)) == '105'( 1)) '101'((1, 1 0 1)) '53'",0.0,0.5130422614049819 |
| "Prompt: Write a function to remove lowercase substrings from a given string by using regex. Assesments: assert remove_lowercase('KDeoALOklOOHserfLoAJSIskdsf') == 'KDALOOOHLAJSI', assert remove_lowercase('ProducTnamEstreAmIngMediAplAYer') == 'PTEAIMAAY', assert remove_lowercase('maNufacTuredbYSheZenTechNolOGIes') == 'NTYSZTNOGI'",113,0.033,55,2.0545454545454547,Prompt: Write function remove lowercase substrings string regexAssesments: assert remove_lowercase 'KDALOOOHLAJSI'ProducTnamEstreAmIngMediAplAYer 'PTEAIMAAY 'NTYSZTNOGI',0.0,0.4758822481744397 |
| ,161,0.033,76,2.1184210526315788,,0.0,0.5281018457142014 |
| ,71,0.033,33,2.1515151515151514,,0.0,0.5551569430662628 |
| ,51,0.033,28,1.8214285714285714,,0.0,0.2853044660349446 |
| ,40,0.033,22,1.8181818181818181,Prompt: Write function find diameter circleAssesments: assert)==20(40)==80(15)==30,0.0,0.2826501793756201 |
| ,110,0.034,62,1.7741935483870968,Prompt: Write function concatenate elements list stringAssesments: assert concatenate_elements(['hello'there'rocky'day'] ) hello rocky day'( 'Hi' 'there' 'How''are 'you'] ) Hi( 'Part' 'of'journey' 'end'] Part journey end',0.0,0.24668887624928898 |
| "Prompt: Write a python function to find common divisor between two numbers in a given pair. Assesments: assert num_comm_div(2,4) == 2, assert num_comm_div(2,8) == 2, assert num_comm_div(12,24) == 6",60,0.033,33,1.8181818181818181,"Prompt: Write python function find divisor numbers pairAssesments: assert num_comm_div(2,4) 2(2,8),24) 6",0.0,0.2826501793756201 |
| "Prompt: Write a python function to find remainder of two numbers. Assesments: assert find(3,3) == 0, assert find(10,3) == 1, assert find(16,5) == 1",49,0.033,26,1.8846153846153846,"Prompt: Write python function find numbersAssesments: assert find(3,3) 0,3) 1)",0.0,0.33696096794333563 |
| "Prompt: Write a function to add consecutive numbers of a given list. Assesments: assert add_consecutive_nums([1, 1, 3, 4, 4, 5, 6, 7])==[2, 4, 7, 8, 9, 11, 13], assert add_consecutive_nums([4, 5, 8, 9, 6, 10])==[9, 13, 17, 15, 16], assert add_consecutive_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[3, 5, 7, 9, 11, 13, 15, 17, 19]",171,0.033,77,2.220779220779221,"Prompt: Write function add numbers listAssesments: assert add 6 7 4 7 8 9 11 13 5 8 9 10 13, 17, 15 16 2 3 4 5 6 7 8 9 10 5 7 9 11 15 19",0.0,0.6117817251318513 |
| "Prompt: Write a python function to find the cube sum of first n natural numbers. Assesments: assert sum_Of_Series(5) == 225, assert sum_Of_Series(2) == 9, assert sum_Of_Series(3) == 36",59,0.033,27,2.185185185185185,Prompt: Write python function find cube sum first numbersAssesments: assert sum_Series(5) 225 9 36,0.0,0.5826828787925904 |
| "Prompt: Write a function to move all zeroes to the end of the given array. Assesments: assert re_order([6, 0, 8, 2, 3, 0, 4, 0, 1]) == [6, 8, 2, 3, 4, 1, 0, 0, 0], assert re_order([4, 0, 2, 7, 0, 9, 0, 12, 0]) == [4, 2, 7, 9, 12, 0, 0, 0, 0], assert re_order([3, 11, 0, 74, 14, 0, 1, 0, 2]) == [3, 11, 74, 14, 1, 2, 0, 0, 0]",196,0.033,101,1.9405940594059405,"Prompt: Write function move zeroes end arrayAssesments: assert re_order([6, 0 8, 2, 3, 0 4, 0, 1 2 3 0 0[4, 0 2, 7, 0 9, 0 12, 0[3, 11, 0 74, 14, 0, 1, 0, 2] 74 14",0.0,0.38272467045193176 |
| "Prompt: Write a function to calculate the permutation coefficient of given p(n, k). Assesments: assert permutation_coefficient(10, 2) == 90, assert permutation_coefficient(10, 3) == 720, assert permutation_coefficient(10, 1) == 10",62,0.033,32,1.9375,"Prompt: Write function calculate permutation coefficient p(nAssesments: assert, 2) == 90 3) 720, 1) 10",0.0,0.38019521410579343 |
| "Prompt: Write a function to remove specific words from a given list. Assesments: assert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['white', 'orange'])==['red', 'green', 'blue', 'black'], assert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['black', 'orange'])==['red', 'green', 'blue', 'white'], assert remove_words(['red', 'green', 'blue', 'white', 'black', 'orange'],['blue', 'white'])==['red', 'green', 'black', 'orange']",138,0.033,72,1.9166666666666667,Prompt: Write function remove words listAssesments: assert remove_words(['red' 'green 'blue 'white' 'black 'orange'])==['red'' assert remove_words('red 'orange']'black)==['red assert remove_words(['red 'black 'orange']['blue' 'white'])==['red' 'green 'black 'orange'],0.0,0.3631635413751283 |
| ,104,0.034,51,2.0392156862745097,,0.0,0.4633498515555115 |
| ,55,0.033,30,1.8333333333333333,Prompt: Write python function find average odd numbersAssesments: assert average_Odd(9) == 5 3(11) 6,0.0,0.29503685045246747 |
| ,93,0.033,54,1.7222222222222223,,0.0,0.2042012625555867 |
| ,56,0.032,27,2.074074074074074,Prompt: Write python function find minimum sum numberAssesments: assert find_Min_Sum(12) 7 15 2,0.0,0.49184729089570944 |
| ,200,0.034,95,2.1052631578947367,Prompt: Write function count element frequency mixed nested tupleAssesments: assert count_element_freq((5 6 7 (8 9) {5 2 6 7 8 9 2((6 7 7) 8 (9 10) 2 7 2 8 9 10 2(7 8 9 (10 2 8 2 9 1 10 11 2,0.0,0.5173449997790445 |
| ,185,0.034,97,1.907216494845361,,0.0,0.3554378341570946 |
| ,92,0.033,50,1.84,,0.0,0.30048698572628046 |
| ,81,0.034,42,1.9285714285714286,Prompt: Write function check subset sum divisible mAssesments: assert modular_sum( 7 5 4 6) True 7 2 5) False 6 2 5),0.0,0.37289592579265124 |
| ,127,0.034,62,2.0483870967741935,,0.0,0.4708476657367532 |
| ,75,0.033,47,1.5957446808510638,,0.0,0.10080330611977532 |
| ,42,0.033,24,1.75,Prompt: Write function find root perfect numberAssesments: assert_root(4)==2(16)==4)==20,0.0,0.22691015952980684 |
| ,52,0.033,29,1.793103448275862,Prompt: Write function calculate volume tetrahedronAssesments: assert)==117.85(15)==397.75(20)==942.81,0.0,0.2621481031104934 |
| ,85,0.032,44,1.9318181818181819,Prompt: Write function find lcm array elementsAssesments: assert_lcm 7 3 9 4 252 2 8 3 24 8 4 10 5 120,0.0,0.3755502124519757 |
| ,65,0.033,32,2.03125,,0.0,0.4568377413937867 |
| ,129,0.034,64,2.015625,,0.0,0.4440639868457878 |
| ,101,0.034,53,1.9056603773584906,Prompt: Write function check string capital lower case letter number length lambda functionAssesments: assert check_string('python 1 upper case character 1 number length 8. check_string('123python 1 upper case character check_string'123Python'Valid string,0.0,0.3541656765362863 |
| ,109,0.033,57,1.912280701754386,,0.0,0.3595779260634092 |
| ,75,0.033,43,1.744186046511628,,0.0,0.22215713458171424 |
| ,69,0.033,32,2.15625,,0.0,0.5590277777777778 |
| ,106,0.033,55,1.9272727272727272,,0.0,0.3718342111289214 |
| ,106,0.033,58,1.8275862068965518,,0.0,0.29033845797504276 |
| ,66,0.032,31,2.129032258064516,,0.0,0.5367767214683602 |
| ,150,0.033,65,2.3076923076923075,,0.0,0.6828349372429975 |
| ,85,0.033,46,1.8478260869565217,,0.0,0.30688497061293024 |
| ,64,0.033,36,1.7777777777777777,,0.0,0.249619056504027 |
| ,113,0.034,63,1.7936507936507937,,0.0,0.2625955690607244 |
| ,77,0.034,40,1.925,,0.0,0.3699762104673944 |
| ,64,0.034,30,2.1333333333333333,Prompt: Write function find top surface area cylinderAssesments: assert topbottom_surfacearea(10)==314.15000000000003.264,0.0,0.5402929377740461 |
| ,111,0.033,55,2.018181818181818,,0.0,0.4461542375900057 |
| ,67,0.034,33,2.0303030303030303,,0.0,0.4560635744514837 |
| ,121,0.033,60,2.0166666666666666,Prompt: Write python function convert string list tupleAssesments: assert string_list_to_tuple'p 'y 't 'h 'o 'n '3 '0 string_tuple ('b 'i 'g 'd 'a 't ('l' 'a 'n 'g 'u'e',0.0,0.44491557048232105 |
| ,392,0.036,201,1.9502487562189055,,0.0,0.39061758100067806 |
| ,102,0.033,55,1.8545454545454545,,0.0,0.31237818996005384 |
| ,49,0.033,25,1.96,Prompt: Write function find number abundantAssesments: assert check_abundant(12) True(15) False) True,0.0,0.39858942065491176 |
| ,92,0.033,41,2.2439024390243905,Prompt: Write function replace spaces commas dots with colon string using regexAssesments: assert fill_spaces('Boult Curve Wireless Neckband fill_spaces('Stereo Sound Sweatproof fill_spaces('Probass Curve Audio,0.0,0.6306854252421619 |
| "Prompt: Write a function to add two numbers and print number of digits of sum. Assesments: assert count_digits(9875,10)==(4), assert count_digits(98759853034,100)==(11), assert count_digits(1234567,500)==(7)",60,0.033,28,2.142857142857143,"Prompt: Write function add numbers print digits sumAssesments: assert count_digits(9875,100(11),500(7)",0.0,0.5480788453080644 |
| "Prompt: Write a function to flatten the tuple list to a string. Assesments: assert flatten_tuple([('1', '4', '6'), ('5', '8'), ('2', '9'), ('1', '10')]) == '1 4 6 5 8 2 9 1 10', assert flatten_tuple([('2', '3', '4'), ('6', '9'), ('3', '2'), ('2', '11')]) == '2 3 4 6 9 3 2 2 11', assert flatten_tuple([('14', '21', '9'), ('24', '19'), ('12', '29'), ('23', '17')]) == '14 21 9 24 19 12 29 23 17'",174,0.033,99,1.7575757575757576,Prompt: Write function flatten tuple list stringAssesments: assert flatten_tuple('1'2 '10 '1 4 6 5 8 2 9 10 flatten_tuple'2 '3 '4'6 '11 3 4 6 9 11 flatten_tuple'14 '21 '9'24 '19'12 '29'23 '17' '14 21 9 24 19 12 29 23 17',0.0,0.23310349506823055 |
| ,60,0.033,30,2.0,Prompt: Write python function toggle first last bits numberAssesments: assert toggle_F_bits(10) 3 6(20) 5,0.0,0.43129023229778896 |
| ,63,0.034,32,1.96875,,0.0,0.40574272320179117 |
| ,65,0.033,32,2.03125,Prompt: Write python function find sum hamming distances numbers o nAssesments: assert Total_Hamming_Distance(4) 7 3 8,0.0,0.4568377413937867 |
| ,110,0.033,58,1.896551724137931,,0.0,0.3467191677041412 |
| ,60,0.033,30,2.0,Prompt: Write python function find sum fifth power first numbersAssesments: assert odd_Num_Sum(1) 1 244 3369,0.0,0.43129023229778896 |
| ,83,0.033,49,1.6938775510204083,,0.0,0.18102891870434157 |
| ,164,0.034,86,1.9069767441860466,,0.0,0.35524183312830726 |
| ,76,0.034,46,1.6521739130434783,,0.0,0.14693534844668343 |
| ,67,0.033,38,1.763157894736842,,0.0,0.23766700546496375 |
| ,78,0.033,42,1.8571428571428572,,0.0,0.3145016192875135 |
| ,58,0.033,30,1.9333333333333333,Prompt: Write python function find difference sum cubes first n natural numbersAssesments: assert difference(3) == 30 == 210 6,0.0,0.3767888795596604 |
| ,89,0.034,51,1.7450980392156863,,0.0,0.22290270712259153 |
| ,54,0.034,27,2.0,,0.0,0.43129023229778896 |
| ,57,0.033,30,1.9,,0.0,0.34953820319059603 |
| ,130,0.033,61,2.1311475409836067,Prompt: Write function find largest sum arrayAssesments: assert max_sub_array_sum[-2 -3 4 -1 1 5 -3][-3 -4 5 -2 -3 2 6 -4[-4 -5 6 -3 -4 7 -5,0.0,0.5385060081760747 |
| ,161,0.033,81,1.9876543209876543,,0.0,0.42119738919813543 |
| ,243,0.035,141,1.7234042553191489,,0.0,0.20516759859704276 |
| ,96,0.034,53,1.8113207547169812,,0.0,0.2770411207747836 |
| ,84,0.033,42,2.0,,0.0,0.43129023229778896 |
| ,76,0.033,38,2.0,,0.0,0.43129023229778896 |
| ,72,0.033,43,1.6744186046511629,Prompt: Write python function split string charactersAssesments: assert split'python ['p'y't'h'Name'N''a'm''e split'program ['p''r''o''g''a'm,0.0,0.16512083520460302 |
| "Prompt: Write a function to get the sum of a non-negative integer. Assesments: assert sum_digits(345)==12, assert sum_digits(12)==3, assert sum_digits(97)==16",42,0.033,24,1.75,Prompt: Write function sum non-negative integerAssesments: assert_digits(345)==12)==3(97)==16,0.0,0.22691015952980684 |
| "Prompt: Write a function to check whether a specified list is sorted or not. Assesments: assert issort_list([1,2,4,6,8,10,12,14,16,17])==True, assert issort_list([1, 2, 4, 6, 8, 10, 12, 14, 20, 17])==False, assert issort_list([1, 2, 4, 6, 8, 10,15,14,20])==False",115,0.033,57,2.017543859649123,"Prompt: Write function check list sortedAssesments: assert issort_list([1,2,4,6,8,17)==True[1 2 4 6 8 10 12 14 20 17 2 8,14,20",0.0,0.4456326935446649 |
| "Prompt: Write a function to create a list of empty dictionaries. Assesments: assert empty_list(5)==[{},{},{},{},{}], assert empty_list(6)==[{},{},{},{},{},{}], assert empty_list(7)==[{},{},{},{},{},{},{}]",59,0.033,34,1.7352941176470589,"Prompt: Write function list empty dictionariesAssesments: assert empty_list(5)=={},{} empty_list(6)=={},{} empty_list(7)==[{},{}",0.0,0.21488780230816087 |
| "Prompt: Write a function to sort each sublist of strings in a given list of lists. Assesments: assert sort_sublists([['green', 'orange'], ['black', 'white'], ['white', 'black', 'orange']])==[['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']], assert sort_sublists([['green', 'orange'], ['black'], ['green', 'orange'], ['white']])==[['green', 'orange'], ['black'], ['green', 'orange'], ['white']], assert sort_sublists([['a','b'],['d','c'],['g','h'] , ['f','e']])==[['a', 'b'], ['c', 'd'], ['g', 'h'], ['e', 'f']]",170,0.033,94,1.8085106382978724,"Prompt: Write function sort sublist strings given listAssesments: assert sort_sublists(['green', 'orange' ['black' 'white'] 'white' assert sort_sublists(' 'orange' assert sort_sublists([['a','b'],['d','c']['g','h'] ['f','e']])==[['a' 'b'] ['c', 'd'] ['g', 'h'] ['e', 'f']] |
| Prompt: Write a function to remove words from a given list of strings containing a character or string. Assesments: assert remove_words(['Red color', 'Orange#', 'Green', 'Orange @', White],['#', 'color', '@'])==['Red', '', 'Green', 'Orange', 'White'], assert remove_words(['Red &', 'Orange+', 'Green', 'Orange @', 'White'],['&', '+', '@'])==['Red', '', 'Green', 'Orange', 'White'], assert remove_words(['Red &', 'Orange+', 'Green', 'Orange @', 'White'],['@'])==['Red &', 'Orange+', 'Green', 'Orange', 'White']Prompt: Write function remove words list stringsAssesments: assert remove_words('Red color 'Orange# 'Green' 'Orange @ ""White'Red 'Green 'Orange 'White' assert remove_words('Red 'Orange+ 'Green' 'Orange @ 'White''Red 'Orange remove_words(['Red & 'Orange+ 'Green' 'Orange @' 'White'@''Red 'Orange+ 'White' |
| Prompt: Write a function to find maximum possible sum of disjoint pairs for the given array of integers and a number k. Assesments: assert max_sum_pair_diff_lessthan_K([3, 5, 10, 15, 17, 12, 9], 7, 4) == 62, assert max_sum_pair_diff_lessthan_K([5, 15, 10, 300], 4, 12) == 25, assert max_sum_pair_diff_lessthan_K([1, 2, 3, 4, 5, 6], 6, 6) == 21Prompt: Write function find maximum disjoint pairs integers number kAssesments: assert max_sum_pair_diff_K( 5 10 15 17, 12 9 7 4) == 62_K([5 15 10 300 4 12 25( 6 6) 21 |
| Prompt: Write a python function to remove two duplicate numbers from a given number of lists. Assesments: assert two_unique_nums([1,2,3,2,3,4,5]) == [1, 4, 5], assert two_unique_nums([1,2,3,2,4,5]) == [1, 3, 4, 5], assert two_unique_nums([1,2,3,4,5]) == [1, 2, 3, 4, 5]Prompt: Write python function remove two duplicate numbers listsAssesments: assert two_unique_nums([1,2,3,2,3,4,5]) [1 4 5,4,5 4 5,4,5 3 4 5] |
| Prompt: Write a python function to calculate the product of the unique numbers of a given list. Assesments: assert unique_product([10, 20, 30, 40, 20, 50, 60, 40]) == 720000000, assert unique_product([1, 2, 3, 1,]) == 6, assert unique_product([7, 8, 9, 0, 1, 1]) == 0 |
| Prompt: Write a function to find the surface area of a cylinder. Assesments: assert surfacearea_cylinder(10,5)==942.45, assert surfacearea_cylinder(4,5)==226.18800000000002, assert surfacearea_cylinder(4,10)==351.848Prompt: Write function surface cylinderAssesments: assert,5)==942.45(4,5)==226.18800000000002,10)==351.848 |
| Prompt: Write a python function to find nth number in a sequence which is not a multiple of a given number. Assesments: assert count_no(2,3,1,10) == 5, assert count_no(3,6,4,20) == 11, assert count_no(5,10,4,20) == 16Prompt: Write python function find nth sequence notAssesments: assert count_no(2,3,1,10) 5,6,4,20) 11,10,4,20) 16 |
| Prompt: Write a python function to check whether an array is subarray of another or not. Assesments: assert is_Sub_Array([1,4,3,5],[1,2],4,2) == False, assert is_Sub_Array([1,2,1],[1,2,1],3,3) == True, assert is_Sub_Array([1,0,2,2],[2,2,0],4,3) ==FalsePrompt: Write python function check arrayAssesments:_Array([1,4,3,5],4,2) False([1,2,1],3,3) True_Array([1,0,2,2],2,0],4,3) |
| Prompt: Write a python function to find the last digit in factorial of a given number. Assesments: assert last_Digit_Factorial(4) == 4, assert last_Digit_Factorial(21) == 0, assert last_Digit_Factorial(30) == 0 |
| Prompt: Write a function to interleave lists of the same length. Assesments: assert interleave_lists([1,2,3,4,5,6,7],[10,20,30,40,50,60,70],[100,200,300,400,500,600,700])==[1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500, 6, 60, 600, 7, 70, 700], assert interleave_lists([10,20],[15,2],[5,10])==[10,15,5,20,2,10], assert interleave_lists([11,44], [10,15], [20,5])==[11,10,20,44,15,5]Prompt: Write function interleave lists lengthAssesments: assert_lists,3,200,600,700 10 100 20 200 3 30 300 40 400 5 50 500 6 60 600 7 70 700 assert,20,2],10,15,5,20,2,10,44,15 [20,5],10,20,44,15,5 |
| Prompt: Write a function to find the dissimilar elements in the given two tuples. Assesments: assert find_dissimilar((3, 4, 5, 6), (5, 7, 4, 10)) == (3, 6, 7, 10), assert find_dissimilar((1, 2, 3, 4), (7, 2, 3, 9)) == (1, 4, 7, 9), assert find_dissimilar((21, 11, 25, 26), (26, 34, 21, 36)) == (34, 36, 11, 25)Prompt: Write function find dissimilar elements tuplesAssesments: assert find_dissimilar((3, 4 5, 6) 10_dissimilar((1, 2, 3, 4) 9)_dissimilar((21, 11, 25, 26), 21, 36 (34 36 11, 25) |
| Prompt: Write a function to extract the even elements in the nested mixed tuple. Assesments: assert extract_even((4, 5, (7, 6, (2, 4)), 6, 8)) == (4, (6, (2, 4)), 6, 8), assert extract_even((5, 6, (8, 7, (4, 8)), 7, 9)) == (6, (8, (4, 8))), assert extract_even((5, 6, (9, 8, (4, 6)), 8, 10)) == (6, (8, (4, 6)), 8, 10)Prompt: Write function extract even elements nested tupleAssesments: assert extract_even((4, 5, (7 6, (2, 6 8) (2 6 8) 6 (4 7, 9) (6 (8 (4, 6 (9 8 (4 8 10 (6 |
| Prompt: Write a python function to find the surface area of the square pyramid. Assesments: assert surface_Area(3,4) == 33, assert surface_Area(4,5) == 56, assert surface_Area(1,2) == 5Prompt: Write python function find area square pyramidAssesments: assert(3,4) 33) 56(1,2) 5 |
| Prompt: Write a function to check if a dictionary is empty or not. Assesments: assert my_dict({10})==False, assert my_dict({11})==False, assert my_dict({})==True |
| Prompt: Write a function for nth catalan number. Assesments: assert catalan_number(10)==16796, assert catalan_number(9)==4862, assert catalan_number(7)==429 |
| Prompt: Write a function to find all adverbs and their positions in a given sentence by using regex. Assesments: assert find_adverbs(Clearly, he has no excuse for such behavior.) == '0-7: Clearly', assert find_adverbs(Please handle the situation carefuly) == '28-36: carefuly', assert find_adverbs(Complete the task quickly) == '18-25: quickly'Prompt: Write function find adverbs positions sentence regexAssesments: assert find_adverbs no excuse behavior '0-7 handle situation carefuly"") '28-36 carefuly task '18-25 quickly",0.0,0.48968453880292684 |
| "Prompt: Write a function to find the n - expensive price items from a given dataset using heap queue algorithm. Assesments: assert expensive_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}],1)==[{'name': 'Item-2', 'price': 555.22}], assert expensive_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}, {'name': 'Item-3', 'price': 45.09}],2)==[{'name': 'Item-2', 'price': 555.22},{'name': 'Item-1', 'price': 101.1}], assert expensive_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}, {'name': 'Item-3', 'price': 45.09},{'name': 'Item-4', 'price': 22.75}],1)==[{'name': 'Item-2', 'price': 555.22}]",255,0.034,135,1.8888888888888888,Prompt: Write function find n - expensive items dataset heap queue algorithmAssesments: assert expensive_items( 'Item-1 'price 101.1 'Item-2 555.22} 555.22 assert expensive_items( 'Item-1 101.1 'Item-2 555.22 'Item-3 45.09 'Item-2 555.22 'Item-1 101.1 expensive_items( 'Item-1 101.1 'Item-2 555.22 'Item-3 'price 45.09 'Item-4 'price 22.75 'Item-2 555.22,0.0,0.34045464440090795 |
| ,128,0.033,66,1.9393939393939394,,0.0,0.3817435479903994 |
| ,130,0.033,62,2.096774193548387,,0.0,0.5104050991757174 |
| ,67,0.033,39,1.7179487179487178,,0.0,0.20070758609801417 |
| ,84,0.033,43,1.9534883720930232,,0.0,0.393266032713048 |
| ,142,0.033,70,2.0285714285714285,,0.0,0.45464795489984394 |
| ,99,0.034,48,2.0625,,0.0,0.4823852504897845 |
| ,57,0.033,25,2.28,Prompt: Write python function find sum binomial co-efficientsAssesments: assert sum == 15 56 1,0.0,0.6601959137979287 |
| ,84,0.033,44,1.9090909090909092,,0.0,0.35697020583670463 |
| ,96,0.033,55,1.7454545454545454,,0.0,0.22319415820675256 |
| ,71,0.036,37,1.9189189189189189,,0.0,0.36500480329195684 |
| ,175,0.034,89,1.9662921348314606,,0.0,0.40373336855379127 |
| ,160,0.035,79,2.0253164556962027,Prompt: Write function find kth arraysAssesments: assert find_kth 3 6 7 9 8 10 5) 6 112 256 770 86 113 119 265 445 892] 5 7 7) 256 4 7 8 10 5 9 11 6) 8,0.0,0.45198694852745813 |
| ,48,0.034,24,2.0,Prompt: Write function check number armstrongAssesments: assert armstrong_number(153)==True armstrong armstrong,0.0,0.43129023229778896 |
| ,62,0.033,30,2.066666666666667,,0.0,0.4857915850359177 |
| ,54,0.033,29,1.8620689655172413,Prompt: Write python function check number even bitwise operatorAssesments: assert_Even(1) False True_Even(3) False,0.0,0.3185288128395919 |
| ,151,0.034,80,1.8875,,0.0,0.33931919955219697 |
| ,59,0.033,29,2.0344827586206895,,0.0,0.4594805871623381 |
| ,135,0.034,69,1.9565217391304348,,0.0,0.39574587181640075 |
| ,51,0.033,28,1.8214285714285714,,0.0,0.2853044660349446 |
| ,44,0.033,22,2.0,Prompt: Write function check integer prime numberAssesments: assert prime_num prime_num(-1010)==False,0.0,0.43129023229778896 |
| ,62,0.033,23,2.6956521739130435,Prompt: Write function convert degrees radiansAssesments: assert(90)==1.5707963267948966,0.0,1.0 |
| ,112,0.033,59,1.8983050847457628,,0.0,0.34815257557860985 |
| ,45,0.032,20,2.25,Prompt: Write python function find nth bell numberAssesments: assert 2 5 15,0.0,0.635670305065771 |
| ,62,0.033,38,1.631578947368421,,0.0,0.13009854611339425 |
| ,240,0.034,114,2.1052631578947367,,0.0,0.5173449997790445 |
| ,138,0.033,71,1.943661971830986,,0.0,0.3852327511106381 |
| ,172,0.033,97,1.7731958762886597,,0.0,0.24587325906498037 |
| ,215,0.034,135,1.5925925925925926,,0.0,0.09822641000922551 |
| ,116,0.034,62,1.8709677419354838,Prompt: Write function find cumulative sum values tuple listAssesments: assert_sum 3) (5 6 7) 30 4) (6 7 8) (3 7) 37 5) (7 8 9) (4 8) 44,0.0,0.32580374312721744 |
| ,223,0.034,114,1.956140350877193,,0.0,0.39543407918059914 |
| ,146,0.033,79,1.8481012658227849,,0.0,0.30710993491977456 |
| ,81,0.033,48,1.6875,,0.0,0.17581514133781131 |
| ,102,0.033,55,1.8545454545454545,,0.0,0.31237818996005384 |
| ,107,0.033,55,1.9454545454545455,Prompt: Write function move numbers given stringAssesments: assert move_num('I1love143you55three3000thousand ==' move_num('Avengers124Assemble move_num('Its11our12path13to14see15things16do17things',0.0,0.3866982164211384 |
| "Prompt: Write a function to find the largest subset where each pair is divisible. Assesments: assert largest_subset([ 1, 3, 6, 13, 17, 18 ], 6) == 4, assert largest_subset([10, 5, 3, 15, 20], 5) == 3, assert largest_subset([18, 1, 3, 6, 13, 17], 6) == 4",101,0.033,51,1.9803921568627452,"Prompt: Write function find largest subset divisibleAssesments: assert largest 1 3 6 13, 18 6) 5 3 15 20 5) 3 6 13, 17 6)",0.0,0.41526042266892765 |
| "Prompt: Write a function to increment the numeric values in the given strings by k. Assesments: assert increment_numerics([""MSM"", ""234"", ""is"", ""98"", ""123"", ""best"", ""4""] , 6) == ['MSM', '240', 'is', '104', '129', 'best', '10'], assert increment_numerics([""Dart"", ""356"", ""is"", ""88"", ""169"", ""Super"", ""6""] , 12) == ['Dart', '368', 'is', '100', '181', 'Super', '18'], assert increment_numerics([""Flutter"", ""451"", ""is"", ""44"", ""96"", ""Magnificent"", ""12""] , 33) == ['Flutter', '484', 'is', '77', '129', 'Magnificent', '45']",183,0.034,105,1.7428571428571429,"Prompt: Write function increment numeric values stringsAssesments: assert increment_numerics(""MSM"","" 6)'MSM' '240' '104' '129' '10' increment_numerics(""Dart"", ""6"" 12)'Dart' '368' '100' '181' '18'_numerics(""Flutter"", ""451"", ""Magnificent"", ""12"" 33)'Flutter' '484' 'is '77' '129' 'Magnificent '45']",0.0,0.2210707288792931 |
| "Prompt: Write a function to find the median of two sorted arrays of same size. Assesments: assert get_median([1, 12, 15, 26, 38], [2, 13, 17, 30, 45], 5) == 16.0, assert get_median([2, 4, 8, 9], [7, 13, 19, 28], 4) == 8.5, assert get_median([3, 6, 14, 23, 36, 42], [2, 18, 27, 39, 49, 55], 6) == 25.0",149,0.033,78,1.9102564102564104,"Prompt: Write function find median arraysAssesments: assert_median 12 15 26, 38 13, 17, 30 45 16.0 4 8 9 13, 28 8.5 6 14 23, 36 42 18 27, 39 49 55 25.0",0.0,0.3579230266887698 |
| "Prompt: Write a function to find the n-th power of individual elements in a list using lambda function. Assesments: assert nth_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],2)==[1, 4, 9, 16, 25, 36, 49, 64, 81, 100], assert nth_nums([10,20,30],3)==([1000, 8000, 27000]), assert nth_nums([12,15],5)==([248832, 759375])",132,0.033,68,1.9411764705882353,"Prompt: Write function find n-th power elements lambdaAssesments: assert nth_nums( 2[1 4 9 16 25 36 49 64 81 100_nums([10,20,30[1000 8000 27000_nums([12,15[248832 759375]",0.0,0.3832008034112049 |
| "Prompt: Write a python function to convert the given string to upper case. Assesments: assert is_upper(""person"") ==""PERSON"", assert is_upper(""final"") == ""FINAL"", assert is_upper(""Valid"") == ""VALID""",48,0.033,27,1.7777777777777777,"Prompt: Write python function convert string upper caseAssesments: assert_upper""person"")""final"") ==""Valid"") ""VALID""",0.0,0.249619056504027 |
| "Prompt: Write a python function to interchange first and last elements in a given list. Assesments: assert swap_List([1,2,3]) == [3,2,1], assert swap_List([1,2,3,4,4]) == [4,2,3,4,1], assert swap_List([4,5,6]) == [6,5,4]",83,0.033,48,1.7291666666666667,"Prompt: Write python function interchange elements listAssesments: assert swap[1,2,3] [3,2,1],4,4,2,3,4,5,6 [6,5,4]",0.0,0.20987848679914173 |
| "Prompt: Write a python function to find the largest triangle that can be inscribed in the semicircle. Assesments: assert triangle_area(0) == 0, assert triangle_area(-1) == -1, assert triangle_area(2) == 4",54,0.034,29,1.8620689655172413,Prompt: Write python function find largest triangle semicircleAssesments: assert triangle_area(0) 0(-1) -1 4,0.0,0.3185288128395919 |
| "Prompt: Write a python function to find the smallest missing number from the given array. Assesments: assert find_First_Missing([0,1,2,3],0,3) == 4, assert find_First_Missing([0,1,2,6,9],0,4) == 3, assert find_First_Missing([2,3,5,8,9],0,4) == 0",90,0.033,49,1.836734693877551,"Prompt: Write python function find smallest missing arrayAssesments: assert_Missing([0,1,2,3],0,3) 4,6,9],0[2,3,5,8,9],0",0.0,0.297817531714617 |
| "Prompt: Write a function to replace all spaces in the given string with character * list item * list item * list item * list item '%20'. Assesments: assert replace_spaces(""My Name is Dawood"") == 'My%20Name%20is%20Dawood', assert replace_spaces(""I am a Programmer"") == 'I%20am%20a%20Programmer', assert replace_spaces(""I love Coding"") == 'I%20love%20Coding'",100,0.033,45,2.2222222222222223,"Prompt: Write function replace spaces string with character * list item '%20'.Assesments: assert replace_spaces(""My Name is Dawood"") ==' replace_spaces(I am Programmer)' replace(""I love Coding"")' |
| Prompt: Write a python function to find even numbers from a mixed list. Assesments: assert Split([1,2,3,4,5]) == [2,4], assert Split([4,5,6,7,8,0,1]) == [4,6,8,0], assert Split ([8,12,15,19]) == [8,12]Prompt: Write python function find even numbers mixed listAssesments: assert Split,3,4,5 [2,4,6,7,8,0,15,19 [8,12] |
| Prompt: Write a function to extract all the adjacent coordinates of the given coordinate tuple. Assesments: assert get_coordinates((3, 4)) == [[2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5]], assert get_coordinates((4, 5)) ==[[3, 4], [3, 5], [3, 6], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6]], assert get_coordinates((5, 6)) == [[4, 5], [4, 6], [4, 7], [5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7]]Prompt: Write function extract adjacent coordinates tupleAssesments: assert_coordinates((3, 4), 3 4 5 [3 4 5_coordinates((4, 5)[3, 4] [3, 5 [3, 6, 4 5, 6, 4, 5,_coordinates((5, 6) [[4, 5] [4, 6, 7 [5, 5 [5, 6 [5, 7 [6, 5 [6, 6, 7]] |
| Prompt: Write a function to replace whitespaces with an underscore and vice versa in a given string by using regex. Assesments: assert replace_spaces('Jumanji The Jungle') == 'Jumanji_The_Jungle', assert replace_spaces('The Avengers') == 'The_Avengers', assert replace_spaces('Fast and Furious') == 'Fast_and_Furious' |
| Prompt: Write a python function to move all zeroes to the end of the given list. Assesments: assert move_zero([1,0,2,0,3,4]) == [1,2,3,4,0,0], assert move_zero([2,3,2,0,0,4,0,5,0]) == [2,3,2,4,5,0,0,0,0], assert move_zero([0,1,0,1,1]) == [1,1,1,0,0]Prompt: Write python function move zeroes end listAssesments: assert move_zero,2,0,3,4 [1,2,3,4,0,0,2,4,0,5,4,5,1,0,1,1] [1,1,1,0,0 |
| Prompt: Write a python function to find the sum of xor of all pairs of numbers in the given array. Assesments: assert pair_OR_Sum([5,9,7,6],4) == 47, assert pair_OR_Sum([7,3,5],3) == 12, assert pair_OR_Sum([7,3],2) == 4Prompt: Write python function find sum pairs arrayAssesments: assert([5,9,7,6],4) 47[7,3,5],3) 12[7,3],2) 4 |
| Prompt: Write a python function to find the sum of fourth power of first n even natural numbers. Assesments: assert even_Power_Sum(2) == 272, assert even_Power_Sum(3) == 1568, assert even_Power_Sum(4) == 5664 |
| Prompt: Write a function to push all values into a heap and then pop off the smallest values one at a time. Assesments: assert heap_sort([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], assert heap_sort([25, 35, 22, 85, 14, 65, 75, 25, 58])==[14, 22, 25, 25, 35, 58, 65, 75, 85], assert heap_sort( [7, 1, 9, 5])==[1,5,7,9]Prompt: Write function push values heap pop smallest valuesAssesments: assert heap_sort([1, 3 5 7 9 4 6 8 0 3 7 8 9([25 35 22, 85 14 65 75 25 58 75 85 [7 1 9 5[1,5,7,9] |
| Prompt: Write a python function to check if roots of a quadratic equation are reciprocal of each other or not. Assesments: assert Check_Solution(2,0,2) == Yes, assert Check_Solution(2,-5,2) == Yes, assert Check_Solution(1,2,3) == NoPrompt: Write python function check roots quadratic equation reciprocalAssesments: assert Check_Solution(2,0,2),-5,2),2,3) No |
| Prompt: Write a function to check whether the given amount has no profit and no loss Assesments: assert noprofit_noloss(1500,1200)==False, assert noprofit_noloss(100,100)==True, assert noprofit_noloss(2000,5000)==FalsePrompt: Write function check amount no profit lossAssesments: assert noprofit_noloss(1500,1200(100(2000,5000 |
| Prompt: Write a function to calculate wind chill index. Assesments: assert wind_chill(120,35)==40, assert wind_chill(40,70)==86, assert wind_chill(10,100)==116Prompt: Write function calculate wind chillAssesments: assert,35)==40,70)==86,100)==116 |
| Prompt: Write a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter. Assesments: assert sample_nam(['sally', 'Dylan', 'rebecca', 'Diana', 'Joanne', 'keith'])==16, assert sample_nam([php, res, Python, abcd, Java, aaa])==10, assert sample_nam([abcd, Python, abba, aba])==6Prompt: Write function sum length names list removing names lowercase letterAssesments: assert sample_nam('sally 'Dylan 'rebecca 'Diana 'Joanne 'keith)==16 assert([ aaa)==10 assertabcd, abba,)==6 |
| Prompt: Write a function to remove the parenthesis area in a string. Assesments: assert remove_parenthesis([python (chrome)])==(python), assert remove_parenthesis([string(.abc)])==(string), assert remove_parenthesis([alpha(num)])==(alpha)Prompt: Write function remove parenthesis stringAssesments: assert remove_parenthesis(python (chrome)python),string()[alpha(num)alpha) |
| Prompt: Write a function to find the nth nonagonal number. Assesments: assert is_nonagonal(10) == 325, assert is_nonagonal(15) == 750, assert is_nonagonal(18) == 1089 |
| Prompt: Write a function to remove similar rows from the given tuple matrix. Assesments: assert remove_similar_row([[(4, 5), (3, 2)], [(2, 2), (4, 6)], [(3, 2), (4, 5)]] ) == {((2, 2), (4, 6)), ((3, 2), (4, 5))}, assert remove_similar_row([[(5, 6), (4, 3)], [(3, 3), (5, 7)], [(4, 3), (5, 6)]] ) == {((4, 3), (5, 6)), ((3, 3), (5, 7))}, assert remove_similar_row([[(6, 7), (5, 4)], [(4, 4), (6, 8)], [(5, 4), (6, 7)]] ) =={((4, 4), (6, 8)), ((5, 4), (6, 7))}Prompt: Write function remove similar rows tuple matrixAssesments: assert remove_similar_row, 5) (3, 2), (4, 6)((2, 2) (4,, (4, remove_similar_row(, 6) (4, 3), 3) (5, 7)((4, (5, (5, 7)_similar_row(, 7) (5, 4), 4) (6, 8), 4) (6,((4, 4) (6, (6, 7) |
| Prompt: Write a function that matches a word containing 'z', not at the start or end of the word. Assesments: assert text_match_wordz_middle(pythonzabc.)==('Found a match!'), assert text_match_wordz_middle(xyzabc.)==('Found a match!'), assert text_match_wordz_middle( lang .)==('Not matched!')Prompt: Write function matches word 'z' not start endAssesments: assert text_match_wordz_middle(pythonzabc.)=='Found match!""xyzabc'Found match lang'Not matched!' |
| Prompt: Write a python function to reverse an array upto a given position. Assesments: assert reverse_Array_Upto_K([1, 2, 3, 4, 5, 6],4) == [4, 3, 2, 1, 5, 6], assert reverse_Array_Upto_K([4, 5, 6, 7], 2) == [5, 4, 6, 7], assert reverse_Array_Upto_K([9, 8, 7, 6, 5],3) == [7, 8, 9, 6, 5]Prompt: Write python function reverse array positionAssesments: assert reverse_Array([1 2 3 4 5 6 3 5 6[4 6 7 4 6 7[9 8 7 6 5 [7, 8 9 6 5 |
| Prompt: Write a function to find the product of it’s kth index in the given tuples. Assesments: assert find_k_product([(5, 6, 7), (1, 3, 5), (8, 9, 19)], 2) == 665, assert find_k_product([(6, 7, 8), (2, 4, 6), (9, 10, 20)], 1) == 280, assert find_k_product([(7, 8, 9), (3, 5, 7), (10, 11, 21)], 0) == 210Prompt: Write function find product index tuplesAssesments: assert find, 6 7) 3 5) 9 19 665, 7, 8) (2 4 6) 10 20 280(7, 8 9) 5 7) (10 11 21 210 |
| Prompt: Write a python function to count number of cubes of size k in a cube of size n. Assesments: assert No_of_cubes(2,1) == 8, assert No_of_cubes(5,2) == 64, assert No_of_cubes(1,1) == 1Prompt: Write python function count cubes k nAssesments: assert No_cubes(2,1) == 8,2) 64,1) 1 |
| Prompt: Write a function to split a string at uppercase letters. Assesments: assert split_upperstring(PythonProgramLanguage)==['Python','Program','Language'], assert split_upperstring(PythonProgram)==['Python','Program'], assert split_upperstring(ProgrammingLanguage)==['Programming','Language']Prompt: Write function split string uppercase lettersAssesments: assert split_upperstring(PythonProgramLanguage)=='Python split_upperstring split""ProgrammingLanguage"")==",0.0,0.35217536541986044 |
| "Prompt: Write a function to exchange the position of every n-th value with (n+1)th value and (n+1)th value with n-th value in a given list. Assesments: assert exchange_elements([0,1,2,3,4,5])==[1, 0, 3, 2, 5, 4] , assert exchange_elements([5,6,7,8,9,10])==[6,5,8,7,10,9] , assert exchange_elements([25,35,45,55,75,95])==[35,25,55,45,95,75]",140,0.033,83,1.6867469879518073,"Prompt: Write function exchange n-th listAssesments: assert exchange_elements([0,1,2,3,4,5[1 3 2 5 4([5,6,7,8,9,10[6,5,8,7,10,9([25,35,45,55,75,95[35,25,55,45,95",0.0,0.1751995387089922 |
| "Prompt: Write a python function to calculate the sum of the numbers in a list between the indices of a specified range. Assesments: assert sum_Range_list([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12],8,10) == 29, assert sum_Range_list([1,2,3,4,5],1,2) == 5, assert sum_Range_list([1,0,1,2,5,6],4,5) == 11",126,0.033,69,1.826086956521739,"Prompt: Write python function calculate sum numbers rangeAssesments: assert sum_Range_list([2 5 6 8 3 9 10 11 12 29,[1,2,3,4,5 5[1,0,1,2,5,6,4,5) 11",0.0,0.2891127903722361 |
| "Prompt: Write a python function to check whether the given two arrays are equal or not. Assesments: assert are_Equal([1,2,3],[3,2,1],3,3) == True, assert are_Equal([1,1,1],[2,2,2],3,3) == False, assert are_Equal([8,9],[4,5,6],2,3) == False",91,0.033,52,1.75,"Prompt: Write python function check arraysAssesments: assert([1,2,3],2,1],3) True[1,2,2],3) False([8,9][4,5,6],2,3) False",0.0,0.22691015952980684 |
| "Prompt: Write a function to check if one tuple is a subset of another tuple. Assesments: assert check_subset((10, 4, 5, 6), (5, 10)) == True, assert check_subset((1, 2, 3, 4), (5, 6)) == False, assert check_subset((7, 8, 9, 10), (10, 8)) == True",92,0.033,48,1.9166666666666667,Prompt: Write function check tupleAssesments: assert check_subset((10 4 5 6) True 2 3 4) (5 6) False(7 8 9 (10 8) True,0.0,0.3631635413751283 |
| "Prompt: Write a function to flatten the given tuple matrix into the tuple list with each tuple representing each column. Assesments: assert matrix_to_list([[(4, 5), (7, 8)], [(10, 13), (18, 17)], [(0, 4), (10, 1)]]) == '[(4, 7, 10, 18, 0, 10), (5, 8, 13, 17, 4, 1)]', assert matrix_to_list([[(5, 6), (8, 9)], [(11, 14), (19, 18)], [(1, 5), (11, 2)]]) == '[(5, 8, 11, 19, 1, 11), (6, 9, 14, 18, 5, 2)]', assert matrix_to_list([[(6, 7), (9, 10)], [(12, 15), (20, 21)], [(23, 7), (15, 8)]]) == '[(6, 9, 12, 20, 23, 15), (7, 10, 15, 21, 7, 8)]'",269,0.034,140,1.9214285714285715,"Prompt: Write function flatten tuple matrix columnAssesments: assert matrix_list, 5) (7, 8), (18, 17, 4) (10, 18 (5 8 13, 17,, 6) (8, 9)(11, (19, 18, 5) (11, 8 11 19, (6 9 14 18 5,, 7) (9, 10, 15), (20, 21)(23, 7) (15,, 9 12 20 23, (7 10 15 21, 7, 8)",0.0,0.36705649514213745 |
| "Prompt: Write a function to group a sequence of key-value pairs into a dictionary of lists using collections module. Assesments: assert grouping_dictionary([('yellow', 1), ('blue', 2), ('yellow', 3), ('blue', 4), ('red', 1)])== ({'yellow': [1, 3], 'blue': [2, 4], 'red': [1]}), assert grouping_dictionary([('yellow', 10), ('blue', 20), ('yellow', 30), ('blue', 40), ('red', 10)])== ({'yellow': [10, 30], 'blue': [20, 40], 'red': [10]}), assert grouping_dictionary([('yellow', 15), ('blue', 25), ('yellow', 35), ('blue', 45), ('red', 15)])== ({'yellow': [15, 35], 'blue': [25, 45], 'red': [15]})",209,0.034,119,1.7563025210084033,"Prompt: Write function group key-value pairs dictionary collections moduleAssesments: assert grouping_dictionary('yellow 1) 2) 3) 4)' 1)'yellow' [1, 3' [2, 4] 'red' [1] assert grouping_dictionary('yellow' 10),'yellow [10 30 [20 40 'red' assert grouping_dictionary('yellow' 15), 25), 35), 45),'red' 15'yellow' [15, 35] 'blue' [25, 45] 'red'",0.0,0.2320625983390837 |
| "Prompt: Write a function to find the perimeter of a rectangle. Assesments: assert rectangle_perimeter(10,20)==60, assert rectangle_perimeter(10,5)==30, assert rectangle_perimeter(4,2)==12",49,0.033,25,1.96,"Prompt: Write function find perimeter rectangleAssesments: assert rectangle,20)==60,5)==30,2)==12",0.0,0.39858942065491176 |
| "Prompt: Write a python function to find the sum of fifth power of n natural numbers. Assesments: assert fifth_Power_Sum(2) == 33, assert fifth_Power_Sum(4) == 1300, assert fifth_Power_Sum(3) == 276",61,0.032,29,2.103448275862069,Prompt: Write python function find sum fifth power n numbersAssesments: assert fifth_Sum(2) 33 1300 276,0.0,0.5158612968914367 |
| "Prompt: Write a python function to find the minimum sum of absolute differences of two arrays. Assesments: assert find_Min_Sum([3,2,1],[2,1,3],3) == 0, assert find_Min_Sum([1,2,3],[4,5,6],3) == 9, assert find_Min_Sum([4,1,8,7],[2,3,6,5],4) == 6",97,0.033,59,1.6440677966101696,"Prompt: Write python function differences arraysAssesments: assert_Sum([3,2,1],1,3] 0[1,2,3],5,6] 9[4,1,8,7[2,3,6,5],4)",0.0,0.14030843378066193 |
| "Prompt: Write a python function to find the first digit in factorial of a given number. Assesments: assert first_Digit(5) == 1, assert first_Digit(10) == 3, assert first_Digit(7) == 5",54,0.033,30,1.8,Prompt: Write python function find first digit factorial numberAssesments: assert_Digit(5) 1) 3(7) 5,0.0,0.2677861740834033 |
| "Prompt: Write a function to find the item with maximum occurrences in a given list. Assesments: assert max_occurrences([2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,4,6,9,1,2])==2, assert max_occurrences([1, 3,5, 7,1, 3,13, 15, 17,5, 7,9,1, 11])==1, assert max_occurrences([1, 2, 3,2, 4, 5,1, 1, 1])==1",143,0.033,73,1.9589041095890412,"Prompt: Write function maximum occurrences listAssesments: assert max_occurrences,8,4,7,9,8,6,5,1,6,3,4,6,9 3,5 7,1 3,13 15 17,5,1 11 3,2 4 5,1",0.0,0.3976935080071618 |
| "Prompt: Write a python function to print duplicants from a list of integers. Assesments: assert Repeat([10, 20, 30, 20, 20, 30, 40, 50, -20, 60, 60, -20, -20]) == [20, 30, -20, 60], assert Repeat([-1, 1, -1, 8]) == [-1], assert Repeat([1, 2, 3, 1, 2,]) == [1, 2]",117,0.035,56,2.0892857142857144,"Prompt: Write python function print duplicants integersAssesments: assert Repeat([10 20 30 40 50 -20 60 [20 30 60 assert[-1, 1 8] assert Repeat[1 2, 3, [1",0.0,0.5042831154292112 |
| "Prompt: Write a python function to choose points from two ranges such that no point lies in both the ranges. Assesments: assert find_Points(5,10,1,5) == (1,10), assert find_Points(3,5,7,9) == (3,9), assert find_Points(1,5,2,8) == (1,8)",83,0.034,50,1.66,"Prompt: Write python function choose points ranges noAssesments: assert_Points(5,10,1,5) (1,10)(3,5,7,9)(1,5,2,8) (1,8",0.0,0.15333333333333324 |
| "Prompt: Write a function to find the maximum sum that can be formed which has no three consecutive elements present. Assesments: assert max_sum_of_three_consecutive([100, 1000, 100, 1000, 1], 5) == 2101, assert max_sum_of_three_consecutive([3000, 2000, 1000, 3, 10], 5) == 5013, assert max_sum_of_three_consecutive([1, 2, 3, 4, 5, 6, 7, 8], 8) == 27",128,0.033,66,1.9393939393939394,"Prompt: Write function find maximum sum no three elementsAssesments: assert max_sum_three_consecutive( 5) 2101([3000 2000, 1000 3 10] 5013([1 2 3 4 5 6 7 8 8) 27",0.0,0.3817435479903994 |
| "Prompt: Write a function to sort a list in a dictionary. Assesments: assert sorted_dict({'n1': [2, 3, 1], 'n2': [5, 1, 2], 'n3': [3, 2, 4]})=={'n1': [1, 2, 3], 'n2': [1, 2, 5], 'n3': [2, 3, 4]}, assert sorted_dict({'n1': [25,37,41], 'n2': [41,54,63], 'n3': [29,38,93]})=={'n1': [25, 37, 41], 'n2': [41, 54, 63], 'n3': [29, 38, 93]}, assert sorted_dict({'n1': [58,44,56], 'n2': [91,34,58], 'n3': [100,200,300]})=={'n1': [44, 56, 58], 'n2': [34, 58, 91], 'n3': [100, 200, 300]}",254,0.034,132,1.9242424242424243,"Prompt: Write function sort list dictionaryAssesments: assert sorted_dict, 3 1, 1 2 [3, 2 4 [1, 2 3 [1, 2 5, 3 4 [25,37,41 [41,54,63] [29,38,93, 37, 41 [41, 54, 63, 38, 93 assert sorted_dict [58,44,56 [91,34,58 [100,200,300 [44, 56 58 [34, 58 91 [100, 200, 300",0.0,0.369356876913552 |
| "Prompt: Write a function to find the largest possible value of k such that k modulo x is y. Assesments: assert find_max_val(15, 10, 5) == 15, assert find_max_val(187, 10, 5) == 185, assert find_max_val(16, 11, 1) == 12",75,0.033,39,1.9230769230769231,"Prompt: Write function find largest value k modulo x yAssesments: assert find_max_val(15, 10, 5) 185(16, 11, 1)",0.0,0.3684040560614868 |
| "Prompt: Write a python function to find the average of even numbers till a given even number. Assesments: assert average_Even(2) == 2, assert average_Even(4) == 3, assert average_Even(100) == 51",55,0.033,30,1.8333333333333333,Prompt: Write python function find average even numbersAssesments: assert average_Even(2) 2 3(100) == 51,0.0,0.29503685045246747 |
| "Prompt: Write a python function to shift first element to the end of given list. Assesments: assert move_last([1,2,3,4]) == [2,3,4,1], assert move_last([2,3,4,1,5,0]) == [3,4,1,5,0,2], assert move_last([5,4,3,2,1]) == [4,3,2,1,5]",99,0.033,51,1.9411764705882353,"Prompt: Write python function shift first element end listAssesments: assert move_last,3,4 [2,3,4,1],1,5,3,2,1] [4,3,2,1,5]",0.0,0.3832008034112049 |
| "Prompt: Write a function to count occurrence of a character in a string. Assesments: assert count_char(""Python"",'o')==1, assert count_char(""little"",'t')==2, assert count_char(""assert"",'s')==2",51,0.033,29,1.7586206896551724,"Prompt: Write function count occurrence characterAssesments: assert count_char""Python"",'o')==1't')==2's')==2",0.0,0.23395774824594412 |
| "Prompt: Write a python function to count number of vowels in the string. Assesments: assert Check_Vow('corner','AaEeIiOoUu') == 2, assert Check_Vow('valid','AaEeIiOoUu') == 2, assert Check_Vow('true','AaEeIiOoUu') ==2",71,0.033,38,1.868421052631579,Prompt: Write python function count vowels stringAssesments: assert Check_Vow'AaEeIiOoUu 2_Vow'AaEeIiOoUu 2_Vow,0.0,0.32372177294621945 |
| "Prompt: Write a python function to replace multiple occurence of character by single. Assesments: assert replace('peep','e') == 'pep', assert replace('Greek','e') == 'Grek', assert replace('Moon','o') == 'Mon'",55,0.033,27,2.037037037037037,Prompt: Write python function replace multiple character singleAssesments: assert replace('peep 'pep''Greek'Moon 'Mon',0.0,0.46156876159674937 |
| ,77,0.033,47,1.6382978723404256,,0.0,0.13559140361219785 |
| ,67,0.033,39,1.7179487179487178,,0.0,0.20070758609801417 |
| ,65,0.033,30,2.1666666666666665,,0.0,0.5675436141431102 |
| ,54,0.033,26,2.076923076923077,,0.0,0.4941764085340913 |
| ,60,0.032,37,1.6216216216216217,,0.0,0.12195823027057287 |
| ,69,0.033,32,2.15625,,0.0,0.5590277777777778 |
| ,71,0.033,40,1.775,,0.0,0.24734816680660499 |
| ,88,0.033,44,2.0,Prompt: Write function remove except alphanumeric characters string regexAssesments: assert remove_extra_char( Android// - 12. remove_extra_char( Flutter//*** - 36. remove_extra_char( Firebase// -.,0.0,0.43129023229778896 |
| ,54,0.033,34,1.588235294117647,,0.0,0.09466423009170072 |
| ,55,0.033,27,2.037037037037037,,0.0,0.46156876159674937 |
| ,88,0.033,43,2.046511627906977,Prompt: Write function access dictionary element indexAssesments: assert access_key'physics 80 90 'chemistry 86 'physics''python 20 'C++ 'C++ access_key 'computer',0.0,0.46931443188252986 |
| "Prompt: Write a python function to check whether a sequence of numbers has an increasing trend or not. Assesments: assert increasing_trend([1,2,3,4]) == True, assert increasing_trend([4,3,2,1]) == False, assert increasing_trend([0,1,4,9]) == True",71,0.033,44,1.6136363636363635,"Prompt: Write python function check numbers increasing trendAssesments: assert increasing_trend[1,2,3,4][4,3,2,1] False[0,1,4,9]",0.0,0.11543011983818018 |
| "Prompt: Write a python function to find the smallest prime divisor of a number. Assesments: assert smallest_Divisor(10) == 2, assert smallest_Divisor(25) == 5, assert smallest_Divisor(31) == 31",55,0.033,30,1.8333333333333333,Prompt: Write python function find smallest divisor numberAssesments: assert_Divisor(10) 2(25) 5(31),0.0,0.29503685045246747 |
| "Prompt: Write a function to multiply two lists using map and lambda function. Assesments: assert mul_list([1, 2, 3],[4,5,6])==[4,10,18], assert mul_list([1,2],[3,4])==[3,8], assert mul_list([90,120],[50,70])==[4500,8400]",83,0.032,44,1.8863636363636365,"Prompt: Write function multiply lists map lambdaAssesments: assert mul_list 3,5,6,10,18][3,8][90,120[50,70][4500,8400]",0.0,0.33839019922143354 |
| "Prompt: Write a python function to check whether the given number can be represented by sum of two squares or not. Assesments: assert sum_Square(25) == True, assert sum_Square(24) == False, assert sum_Square(17) == True",56,0.033,33,1.696969696969697,Prompt: Write python function check number sum squaresAssesments: assert sum_Square(25) True_Square(24) False_Square(17) True,0.0,0.183556810760841 |
| "Prompt: Write a python function to count occurences of a character in a repeated string. Assesments: assert count_Char(""abcac"",'a') == 4, assert count_Char(""abca"",'c') == 2, assert count_Char(""aba"",'a') == 7",62,0.033,31,2.0,Prompt: Write python function count occurences character repeated stringAssesments: assert count_Char == 4'c' 2'a' 7,0.0,0.43129023229778896 |
| "Prompt: Write a python function to find sum of prime numbers between 1 to n. Assesments: assert sum_Of_Primes(10) == 17, assert sum_Of_Primes(20) == 77, assert sum_Of_Primes(5) == 10",60,0.032,27,2.2222222222222223,"Prompt: Write python function find sum prime numbers 1 nAssesments: assert) 17,(20) 77 10",0.0,0.6129614080915509 |
| "Prompt: Write a function to find the frequency of each element in the given list. Assesments: assert freq_element((4, 5, 4, 5, 6, 6, 5, 5, 4) ) == '{4: 3, 5: 4, 6: 2}', assert freq_element((7, 8, 8, 9, 4, 7, 6, 5, 4) ) == '{7: 2, 8: 2, 9: 1, 4: 2, 6: 1, 5: 1}', assert freq_element((1, 4, 3, 1, 4, 5, 2, 6, 2, 7) ) == '{1: 2, 4: 2, 3: 1, 5: 1, 2: 2, 6: 1, 7: 1}'",216,0.034,112,1.9285714285714286,"Prompt: Write function frequency element listAssesments: assert freq_element((4, 5 6 4){4: 3 5 6 2((7, 8 9, 4, 7, 6, 5, 4){7 2 9 6 1 5: 1((1, 4, 3, 4 5, 2, 6, 2 7){1: 2 5 6 1, 7: 1",0.0,0.37289592579265124 |
| "Prompt: Write a function to find the greatest common divisor (gcd) of two integers by using recursion. Assesments: assert recur_gcd(12,14) == 2, assert recur_gcd(13,17) == 1, assert recur_gcd(9, 3) == 3",65,0.033,36,1.8055555555555556,"Prompt: Write function find divisor integers recursionAssesments: assert recur_gcd(12,14) 2(13,17) 1(9, 3)",0.0,0.27232795347824734 |
| "Prompt: Write a function to get the length of a complex number. Assesments: assert len_complex(3,4)==5.0, assert len_complex(9,10)==13.45362404707371, assert len_complex(7,9)==11.40175425099138",61,0.033,32,1.90625,"Prompt: Write function length complex numberAssesments: assert(3,4)==5.0.45362404707371.40175425099138",0.0,0.35464770500979564 |
| "Prompt: ## write a function to find the minimum number of jumps to reach the end of the array for the given array of integers where each element represents the max number of steps that can be made forward from that element. > indented block > indented block Assesments: assert min_jumps([1, 3, 6, 1, 0, 9], 6) == 3, assert min_jumps([1, 3, 5, 8, 9, 2, 6, 7, 6, 8, 9], 11) == 3, assert min_jumps([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 11) == 10",172,0.034,96,1.7916666666666667,"Prompt: write function find minimum jumps end array integers element represents max steps indented blockAssesments: assert min_jumps([1, 3, 6, 1, 0, 9], 6) 3 assert min_jumps([1, 3, 5, 8, 9, 2, 6, 7 9] 11)_jumps([1, 1, 1 11) 10",0.0,0.26097350499113725 |
| "Prompt: Write a function to multiply consecutive numbers of a given list. Assesments: assert mul_consecutive_nums([1, 1, 3, 4, 4, 5, 6, 7])==[1, 3, 12, 16, 20, 30, 42], assert mul_consecutive_nums([4, 5, 8, 9, 6, 10])==[20, 40, 72, 54, 60], assert mul_consecutive_nums([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[2, 6, 12, 20, 30, 42, 56, 72, 90]",171,0.034,78,2.1923076923076925,Prompt: Write function multiply numbers listAssesments: assert 5 6 7 12 16 20 30 42 5 8 9 10 40 72 54 60 2 3 4 5 6 7 8 9 10 6 12 20 30 42 56 72 90,0.0,0.5885056728885446 |
| "Prompt: Write a function to group the 1st elements on the basis of 2nd elements in the given tuple list. Assesments: assert group_element([(6, 5), (2, 7), (2, 5), (8, 7), (9, 8), (3, 7)]) == {5: [6, 2], 7: [2, 8, 3], 8: [9]}, assert group_element([(7, 6), (3, 8), (3, 6), (9, 8), (10, 9), (4, 8)]) == {6: [7, 3], 8: [3, 9, 4], 9: [10]}, assert group_element([(8, 7), (4, 9), (4, 7), (10, 9), (11, 10), (5, 9)]) == {7: [8, 4], 9: [4, 10, 5], 10: [11]}",231,0.035,128,1.8046875,"Prompt: Write function group 1st 2nd listAssesments: assert group, 5) (2, 7) (8, (9, 8) (3, 7) [6 2 7 8 8 [9](7, 6) (3, 8) (9, (10, 9) (4 [7, 3 8, 9 9(8, 7) (4, 9) (10, (11, (5, 9) [8, 4 9 10, 5 10",0.0,0.27161830044780294 |
| "Prompt: Write a python function to find the last two digits in factorial of a given number. Assesments: assert last_Two_Digits(7) == 40, assert last_Two_Digits(5) == 20, assert last_Two_Digits(2) == 2",61,0.034,28,2.1785714285714284,Prompt: Write python function find last two digits factorial numberAssesments: assert_Digits(7) == 40 20 2,0.0,0.5772759985606332 |
| "Prompt: Write a function to remove multiple spaces in a string by using regex. Assesments: assert remove_multiple_spaces('Google Assistant') == 'Google Assistant', assert remove_multiple_spaces('Quad Core') == 'Quad Core', assert remove_multiple_spaces('ChromeCast Built-in') == 'ChromeCast Built-in'",66,0.037,32,2.0625,Prompt: Write function remove multiple spaces string using regex.Assesments: assert remove_multiple_spaces('Google Assistant') =='Quad Core'('ChromeCast Built-in',0.0,0.4823852504897845 |
| "Prompt: Write a function to extract unique values from the given dictionary values. Assesments: assert extract_unique({'msm' : [5, 6, 7, 8],'is' : [10, 11, 7, 5],'best' : [6, 12, 10, 8],'for' : [1, 2, 5]} ) == [1, 2, 5, 6, 7, 8, 10, 11, 12], assert extract_unique({'Built' : [7, 1, 9, 4],'for' : [11, 21, 36, 14, 9],'ISP' : [4, 1, 21, 39, 47],'TV' : [1, 32, 38]} ) == [1, 4, 7, 9, 11, 14, 21, 32, 36, 38, 39, 47], assert extract_unique({'F' : [11, 13, 14, 17],'A' : [12, 11, 15, 18],'N' : [19, 21, 15, 36],'G' : [37, 36, 35]}) == [11, 12, 13, 14, 15, 17, 18, 19, 21, 35, 36, 37]",314,0.035,161,1.950310559006211,"Prompt: Write function extract values dictionaryAssesments: assert extract_unique, 6 7 8 11 7 5, 12 10, 8 [1 2, 5 7 8 11 12, 1 9 4 [11, 21, 36 14, 9, 1 21, 39 47 [1 32 38 7 9 11 14 extract [11, 13, 14, 17 [12, 11 15, 18 [19, 21, 15, 36 [37, 36, 35 [11 12 13, 14 15 17, 18 19, 21, 35 36",0.0,0.39066810603334523 |
| "Prompt: Write a function to check if each element of the second tuple is greater than its corresponding index in the first tuple. Assesments: assert check_greater((10, 4, 5), (13, 5, 18)) == True, assert check_greater((1, 2, 3), (2, 1, 4)) == False, assert check_greater((4, 5, 6), (5, 6, 7)) == True",103,0.033,58,1.7758620689655173,"Prompt: Write function check second tuple greater firstAssesments: assert check_greater((10 4 5) (13 5 18) True((1 2, 3) 4) False assert((4, 5, 6) 7) True",0.0,0.24805292567821888 |
| "Prompt: Write a function to zip two given lists of lists. Assesments: assert zip_list([[1, 3], [5, 7], [9, 11]] ,[[2, 4], [6, 8], [10, 12, 14]] )==[[1, 3, 2, 4], [5, 7, 6, 8], [9, 11, 10, 12, 14]], assert zip_list([[1, 2], [3, 4], [5, 6]] ,[[7, 8], [9, 10], [11, 12]] )==[[1, 2, 7, 8], [3, 4, 9, 10], [5, 6, 11, 12]], assert zip_list([['a','b'],['c','d']] , [['e','f'],['g','h']] )==[['a','b','e','f'],['c','d','g','h']]",224,0.034,117,1.9145299145299146,"Prompt: Write function zip listsAssesments: assert zip_list[1, 3, 7,, 4, 8, 12,, 3 2, 4, 7 6, 8, 11 10 12 zip_list[1, 2 [3, 4 [5,, 8, 10,, 2 7, 8 [3, 4 9, 10, 6 11 zip_list['a','b''c','d'e','f''g','h'f'd'g'h",0.0,0.3614167031463421 |
| "Prompt: Write a function to find number of even elements in the given list using lambda function. Assesments: assert count_even([1, 2, 3, 5, 7, 8, 9, 10])==3, assert count_even([10,15,14,13,-18,12,-20])==5, assert count_even([1, 2, 4, 8, 9])==3",94,0.033,45,2.088888888888889,"Prompt: Write function find even elements list lambdaAssesments: assert count_even( 2 3 5 7 8 9 10)==3,15,14 2 4 8 9",0.0,0.5039587026152937 |
| "Prompt: Write a function to sort dictionary items by tuple product of keys for the given dictionary with tuple keys. Assesments: assert sort_dict_item({(5, 6) : 3, (2, 3) : 9, (8, 4): 10, (6, 4): 12} ) == {(2, 3): 9, (6, 4): 12, (5, 6): 3, (8, 4): 10}, assert sort_dict_item({(6, 7) : 4, (3, 4) : 10, (9, 5): 11, (7, 5): 13} ) == {(3, 4): 10, (7, 5): 13, (6, 7): 4, (9, 5): 11}, assert sort_dict_item({(7, 8) : 5, (4, 5) : 11, (10, 6): 12, (8, 6): 14} ) == {(4, 5): 11, (8, 6): 14, (7, 8): 5, (10, 6): 12}",269,0.034,142,1.8943661971830985,"Prompt: Write function sort dictionary itemsAssesments: assert sort_dict_item, 6) (2, 3) 9 (8, 4) 10 (6, 4) 12 (6 4) 12 (8 4) 10, 7) (3, 4) (9 5) 11 (7, 5) 13 4) (7 5) 11(7, 8) 5 (4, 5) 11 (10, 6) 12 (8 6) 14 5) 11 (8 6) 14 (7 8) (10",0.0,0.344932455071881 |
| "Prompt: Write a python function to find the minimum number of swaps required to convert one binary string to another. Assesments: assert min_Swaps(""1101"",""1110"") == 1, assert min_Swaps(""1111"",""0100"") == ""Not Possible"", assert min_Swaps(""1110000"",""0001101"") == 3",76,0.033,38,2.0,"Prompt: Write python function minimum swaps convert binary stringAssesments: assert min_Swaps(""1101"",""1110"") == 1""0100"") ""Not( 3",0.0,0.43129023229778896 |
| "Prompt: Write a function to count the number of elements in a list which are within a specific range. Assesments: assert count_range_in_list([10,20,30,40,40,40,70,80,99],40,100)==6, assert count_range_in_list(['a','b','c','d','e','f'],'a','e')==5, assert count_range_in_list([7,8,9,15,17,19,45],15,20)==3",105,0.034,59,1.7796610169491525,"Prompt: Write function count elements list specific rangeAssesments: assert count_range_list([10,20,30,40,80,99],100)==6(['a'b')==5([7,8,9,15,17,19,45],15,20)==3 |
| Prompt: Write a function to find the equilibrium index of the given array. Assesments: assert equilibrium_index([1, 2, 3, 4, 1, 2, 3]) == 3, assert equilibrium_index([-7, 1, 5, 2, -4, 3, 0]) == 3, assert equilibrium_index([1, 2, 3]) == -1Prompt: Write function find equilibrium index arrayAssesments: assert equilibrium_index([1, 2 3[-7, 1, 5 2 -4 3 0][1 2 3 -1 |
| Prompt: Write a function to find the minimum number of elements that should be removed such that amax-amin<=k. Assesments: assert removals([1, 3, 4, 9, 10,11, 12, 17, 20], 9, 4) == 5, assert removals([1, 5, 6, 2, 8], 5, 2) == 3, assert removals([1, 2, 3 ,4, 5, 6], 6, 3) == 2 |
| Prompt: Write a function to check whether the given key is present in the dictionary or not. Assesments: assert is_key_present({1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60},5)==True, assert is_key_present({1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60},6)==True, assert is_key_present({1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60},10)==FalsePrompt: Write function check key dictionaryAssesments: assert_key_present({1: 10 2: 20 3: 30 4: 40 5: 50 6: 60,5)==True assert_present( 4: 40 5 50 6 60,6)==True 5 50 6 60,10)==False |
| Prompt: Write a function to calculate the harmonic sum of n-1. Assesments: assert harmonic_sum(10)==2.9289682539682538, assert harmonic_sum(4)==2.083333333333333, assert harmonic_sum(7)==2.5928571428571425 |
| Prompt: Write a function to sort a list of lists by length and value. Assesments: assert sort_sublists([[2], [0], [1, 3], [0, 7], [9, 11], [13, 15, 17]])==[[0], [2], [0, 7], [1, 3], [9, 11], [13, 15, 17]], assert sort_sublists([[1], [2, 3], [4, 5, 6], [7], [10, 11]])==[[1], [7], [2, 3], [10, 11], [4, 5, 6]], assert sort_sublists([[python],[java,C,C++],[DBMS],[SQL,HTML]])==[['DBMS'], ['python'], ['SQL', 'HTML'], ['java', 'C', 'C++']]Prompt: Write function sort length valueAssesments: assert sort_sublists([[2] [1, 3], 7] [9, 11 [13, 15, 17]] [2], 7 [1, 3 [9, 11, 15 17]] assert sort_sublists([[1] [2, 3] [4, 5, 6] [7] [10, 11]] 3 11 5 sort_sublists(python'DBMS",0.0,0.30494618731394546 |
| "Prompt: Write a function to find whether an array is subset of another array. Assesments: assert is_subset([11, 1, 13, 21, 3, 7], 6, [11, 3, 7, 1], 4) == True, assert is_subset([1, 2, 3, 4, 5, 6], 6, [1, 2, 4], 3) == True, assert is_subset([10, 5, 2, 23, 19], 5, [19, 5, 3], 3) == False",136,0.034,75,1.8133333333333332,"Prompt: Write function find arrayAssesments: assert_subset([11, 1, 13, 21, 3, 7 6 1 4) True([1, 2, 3, 4, 5 6 3)[10, 5, 2, 23, 19 3 3) False",0.0,0.27868644463102893 |
| "Prompt: Write a python function to count the total set bits from 1 to n. Assesments: assert count_Set_Bits(16) == 33, assert count_Set_Bits(2) == 2, assert count_Set_Bits(14) == 28",57,0.033,31,1.8387096774193548,Prompt: Write python function count bits 1 to nAssesments: assert_Set_Bits(16) 33 2(14) 28,0.0,0.2994321208345746 |
| "Prompt: Write a python function to convert a string to a list. Assesments: assert Convert('python program') == ['python','program'], assert Convert('Data Analysis') ==['Data','Analysis'], assert Convert('Hadoop Training') == ['Hadoop','Training']",56,0.033,29,1.9310344827586208,Prompt: Write python function convert string listAssesments: assert Convert('python program') Convert('Data Analysis') Convert('Hadoop Training'),0.0,0.3749095225686905 |
| "Prompt: Write a function to count unique keys for each value present in the tuple. Assesments: assert get_unique([(3, 4), (1, 2), (2, 4), (8, 2), (7, 2), (8, 1), (9, 1), (8, 4), (10, 4)] ) == '{4: 4, 2: 3, 1: 2}', assert get_unique([(4, 5), (2, 3), (3, 5), (9, 3), (8, 3), (9, 2), (10, 2), (9, 5), (11, 5)] ) == '{5: 4, 3: 3, 2: 2}', assert get_unique([(6, 5), (3, 4), (2, 6), (11, 1), (8, 22), (8, 11), (4, 3), (14, 3), (11, 6)] ) == '{5: 1, 4: 1, 6: 2, 1: 1, 22: 1, 11: 1, 3: 2}'",276,0.035,143,1.93006993006993,"Prompt: Write function count keys tupleAssesments: assert get_unique, 4) (1 (2 (8 (7 (8 (9 (10,{4: 4, 2: 3 1: 2, 5) (2, (3 (9 (8 (9 (10, (11,: 4, 3: 3, 2: 2, 5) (3, 4) (2, 6) (11, (8, (8 (4, (14, (11, 6){5: 1, 4: 6 2 22 11 1, 3: 2",0.0,0.3741209811738778 |
| "Prompt: Write a function to access the initial and last data of the given tuple record. Assesments: assert front_and_rear((10, 4, 5, 6, 7)) == (10, 7), assert front_and_rear((1, 2, 3, 4, 5)) == (1, 5), assert front_and_rear((6, 7, 8, 9, 10)) == (6, 10)",103,0.033,50,2.06,Prompt: Write function access initial last data tuple recordAssesments: assert front_and_rear((10 4 5 6 7)((1 2 3 4 5)((6 7 8 9 10),0.0,0.4803414497621047 |
| "Prompt: Write a python function to check whether the product of digits of a number at even and odd places is equal or not. Assesments: assert product_Equal(2841) == True, assert product_Equal(1234) == False, assert product_Equal(1212) == False",62,0.034,28,2.2142857142857144,Prompt: Write python function check product digits number even odd places equalAssesments: assert product_Equal(2841) True False False,0.0,0.6064731518132023 |
| "Prompt: Write a function to remove duplicates from a list of lists. Assesments: assert remove_duplicate([[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]])==[[10, 20], [30, 56, 25], [33], [40]] , assert remove_duplicate([""a"", ""b"", ""a"", ""c"", ""c""] )==[""a"", ""b"", ""c""], assert remove_duplicate([1, 3, 5, 6, 3, 5, 6, 1] )==[1, 3, 5, 6]",144,0.034,76,1.894736842105263,"Prompt: Write function remove duplicates listAssesments: assert remove_duplicate([[10, 20] [40] [30, 56, 25][10 20] remove_duplicate([""a"", ""b"", ""c"",] remove_duplicate([1, 3, 5, 6,, 1][1, 3, 5, 6]",0.0,0.3452354648165332 |
| "Prompt: Write a function to check if the given tuple contains all valid values or not. Assesments: assert check_valid((True, True, True, True) ) == True, assert check_valid((True, False, True, True) ) == False, assert check_valid((True, True, True, True) ) == True",69,0.033,35,1.9714285714285715,"Prompt: Write function check tuple contains valid valuesAssesments: assert check_valid((True,) ) == True assert((True False, False assert_valid((True, == True",0.0,0.4079325096957339 |
| "Prompt: Write a python function to count the number of distinct power of prime factor of given number. Assesments: assert count_Fac(24) == 3, assert count_Fac(12) == 2, assert count_Fac(4) == 1",56,0.033,29,1.9310344827586208,Prompt: Write python function count distinct power prime factor numberAssesments: assert count_Fac(24) 3) 2 1,0.0,0.3749095225686905 |
| "Prompt: Write a function to convert the given string of integers into a tuple. Assesments: assert str_to_tuple(""1, -5, 4, 6, 7"") == (1, -5, 4, 6, 7), assert str_to_tuple(""1, 2, 3, 4, 5"") == (1, 2, 3, 4, 5), assert str_to_tuple(""4, 6, 9, 11, 13, 14"") == (4, 6, 9, 11, 13, 14)",131,0.034,68,1.9264705882352942,"Prompt: Write function convert integers tupleAssesments: assert str_to_tuple, -5, 4, 6 7"") (1 4 6 7) 2, 3, 4 5"") 4, 6 9, 11, 13, 14"") 9 14",0.0,0.3711784461895589 |
| "Prompt: Write a function to find the perimeter of a rombus. Assesments: assert rombus_perimeter(10)==40, assert rombus_perimeter(5)==20, assert rombus_perimeter(4)==16",47,0.034,21,2.238095238095238,Prompt: Write function find perimeter rombusAssesments: assert rombus_perimeter(10)==40,0.0,0.6259379206482482 |
| "Prompt: Write a function to calculate the standard deviation. Assesments: assert sd_calc([4, 2, 5, 8, 6])== 2.23606797749979, assert sd_calc([1,2,3,4,5,6,7])==2.160246899469287, assert sd_calc([5,9,10,15,6,4])==4.070217029430577",94,0.033,41,2.292682926829268,"Prompt: Write function calculate standard deviationAssesments: assert sd_calc( 2 5 8 6 2.23606797749979,3,10,15,6,4",0.0,0.6705644638310361 |
| "Prompt: Write a function to create a list taking alternate elements from another given list. Assesments: assert alternate_elements([""red"", ""black"", ""white"", ""green"", ""orange""])==['red', 'white', 'orange'], assert alternate_elements([2, 0, 3, 4, 0, 2, 8, 3, 4, 2])==[2, 3, 0, 8, 4], assert alternate_elements([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])==[1,3,5,7,9]",143,0.034,72,1.9861111111111112,"Prompt: Write function create list taking alternate elements listAssesments: assert alternate_elements( assert_elements([2, 0, 3, 4 8, 3 3([1, 2, 3, 4 5 6 7 8 9 10][1,3,5,7,9]",0.0,0.41993578381067886 |
| "Prompt: Write a function that matches a string that has an a followed by zero or more b's. Assesments: assert text_match(ac)==('Found a match!'), assert text_match(dc)==('Not matched!'), assert text_match(abba)==('Found a match!')Prompt: Write function matches string a followed zero b'sAssesments: assert text_match('Found match matched!abba)=='Found match!' |
| Prompt: Write a function to add a dictionary to the tuple. Assesments: assert add_dict_to_tuple((4, 5, 6), {MSAM : 1, is : 2, best : 3} ) == (4, 5, 6, {'MSAM': 1, 'is': 2, 'best': 3}), assert add_dict_to_tuple((1, 2, 3), {UTS : 2, is : 3, Worst : 4} ) == (1, 2, 3, {'UTS': 2, 'is': 3, 'Worst': 4}), assert add_dict_to_tuple((8, 9, 10), {POS : 3, is : 4, Okay : 5} ) == (8, 9, 10, {'POS': 3, 'is': 4, 'Okay': 5})Prompt: Write function add dictionary tupleAssesments: assert add_dict_to_tuple((4, 5 6)MSAM 1 is 2 best 3 (4 1 2 3 assert add_dict_tuple((1, 2 3)UTS 2 is 3 Worst 4 2 3 4 add_dict_tuple((8, 9,POS 3 is 4 Okay 5'POS 3 'is 4 'Okay 5",0.0,0.3372392253603105 |
| "Prompt: Write a function to find a path with the maximum average over all existing paths for the given square matrix of size n*n. Assesments: assert maxAverageOfPath([[1, 2, 3], [6, 5, 4], [7, 3, 9]], 3) == 5.2, assert maxAverageOfPath([[2, 3, 4], [7, 6, 5], [8, 4, 10]], 3) == 6.2, assert maxAverageOfPath([[3, 4, 5], [8, 7, 6], [9, 5, 11]], 3) == 7.2",153,0.034,87,1.7586206896551724,"Prompt: Write function find path maximum average square matrix nAssesments: assert maxAverageOfPath, 2, 3, 5, 4, 3, 9]] 5.2, 3 4, 6, 5, 4, 6.2[3, 4, 5, 7, 6, 5, 11]] 7.2",0.0,0.23395774824594412 |
| "Prompt: Write a function to filter the height and width of students which are stored in a dictionary. Assesments: assert filter_data({'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66)},6.0,70)=={'Cierra Vega': (6.2, 70)}, assert filter_data({'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66)},5.9,67)=={'Cierra Vega': (6.2, 70),'Kierra Gentry': (6.0, 68)}, assert filter_data({'Cierra Vega': (6.2, 70), 'Alden Cantrell': (5.9, 65), 'Kierra Gentry': (6.0, 68), 'Pierre Cox': (5.8, 66)},5.7,64)=={'Cierra Vega': (6.2, 70),'Alden Cantrell': (5.9, 65),'Kierra Gentry': (6.0, 68),'Pierre Cox': (5.8, 66)}",299,0.034,150,1.9933333333333334,"Prompt: Write function filter height width students dictionaryAssesments: assert filter_data'Cierra Vega (6.2, Cantrell (5.9, Gentry (6.0, Cox (5.8, 66).0,70)=='Cierra Vega (6.2, 70 Cantrell (5.9, Gentry (6.0, Cox (5.8,,67)=='Cierra Vega (6.2, Gentry (6.0, Cantrell (5.9, Gentry.0 Cox (5.8, 66),5.7,64)== Vega (6.2, Cantrell (5.9, Gentry (6.0, Cox (5.8, |
| Prompt: Write a function to count the same pair in two given lists using map function. Assesments: assert count_same_pair([1, 2, 3, 4, 5, 6, 7, 8],[2, 2, 3, 1, 2, 6, 7, 9])==4, assert count_same_pair([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8],[2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==11, assert count_same_pair([2, 4, -6, -9, 11, -12, 14, -5, 17],[2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==1Prompt: Write function count pair two lists map functionAssesments: assert count_same_pair 2 3 4 5, 6, 7, 8 6 7 9 2 -1 -5 -3 -2 4 6 8 count[2, 4, -6, 11,, 14, -5 17] 1 2, -1, -5 6 4 -3 -2 3 4 6 8 |
| Prompt: Write a function to calculate the sum of all digits of the base to the specified power. Assesments: assert power_base_sum(2,100)==115, assert power_base_sum(8,10)==37, assert power_base_sum(8,15)==62Prompt: Write function calculate digits base specified powerAssesments: assert_base_sum(2,100)==115(8,10)==37(8,15)==62 |
| Prompt: Write a function to extract values between quotation marks of the given string by using regex. Assesments: assert extract_quotation('Cortex ""A53"" Based ""multi"" tasking ""Processor""') == ['A53', 'multi', 'Processor'], assert extract_quotation('Cast your ""favorite"" entertainment ""apps""') == ['favorite', 'apps'], assert extract_quotation('Watch content ""4k Ultra HD"" resolution with ""HDR 10"" Support') == ['4k Ultra HD', 'HDR 10']Prompt: Write function extract values quotation marks string regexAssesments: assert extract_quotation('Cortex ""A53"" tasking ""Processor'A53 'Processor extract'Cast entertainment apps content 4k Ultra HD resolution HDR 10 Support Ultra HD 10 |
| Prompt: Write a function to multiply the adjacent elements of the given tuple. Assesments: assert multiply_elements((1, 5, 7, 8, 10)) == (5, 35, 56, 80), assert multiply_elements((2, 4, 5, 6, 7)) == (8, 20, 30, 42), assert multiply_elements((12, 13, 14, 9, 15)) == (156, 182, 126, 135) |
| Prompt: Write a function to remove all characters except letters and numbers using regex Assesments: assert remove_char(123abcjw:, .@! eiw) == '123abcjweiw', assert remove_char(Hello1234:, ! Howare33u) == 'Hello1234Howare33u', assert remove_char(Cool543Triks@:, Make@987Trips) == 'Cool543TriksMake987Trips'Prompt: Write function remove characters except letters numbers regexAssesments: assert remove_char(123abcjw:, remove_charHello1234: Howare33u)Cool543Triks@ Make@987Trips)'",0.0,0.39574587181640075 |
| "Prompt: Write a function to sum elements in two lists. Assesments: assert sum_list([10,20,30],[15,25,35])==[25,45,65], assert sum_list([1,2,3],[5,6,7])==[6,8,10], assert sum_list([15,20,30],[15,45,75])==[30,65,105]",88,0.033,50,1.76,"Prompt: Write function sum listsAssesments: assert sum_list,20,30,25,35,45,65,3],7[6,8,10,20,30,45,75[30,65,105]",0.0,0.23508536244052614 |
| "Prompt: Write a function to add two lists using map and lambda function. Assesments: assert add_list([1, 2, 3],[4,5,6])==[5, 7, 9], assert add_list([1,2],[3,4])==[4,6], assert add_list([10,20],[50,70])==[60,90]",83,0.033,44,1.8863636363636365,"Prompt: Write function add lists map lambdaAssesments: assert add_list 2 3,5,6[5 7 9[4,6][10,20,70][60,90]",0.0,0.33839019922143354 |
| "Prompt: Write a function to remove consecutive duplicates of a given list. Assesments: assert consecutive_duplicates([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4 ])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4], assert consecutive_duplicates([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10])==[10, 15, 19, 18, 17, 26, 17, 18, 10], assert consecutive_duplicates(['a', 'a', 'b', 'c', 'd', 'd'])==['a', 'b', 'c', 'd']",204,0.034,96,2.125,"Prompt: Write function remove duplicates listAssesments: assert consecutive_duplicates( 2 3 4 4 5 6 6 7 8 9 4 4 1 2 3 4 5 6 7 8 9 4 assert consecutive_duplicates([10, 15 19, 18 18 17, 26, 10]_duplicates(['a' 'b' 'c' 'd'",0.0,0.53348026868178 |
| "Prompt: Write a function to find the lateral surface area of a cone. Assesments: assert lateralsurface_cone(5,12)==204.20352248333654, assert lateralsurface_cone(10,15)==566.3586699569488, assert lateralsurface_cone(19,17)==1521.8090132193388",76,0.033,38,2.0,"Prompt: Write function find lateral coneAssesments: assert lateralsurface.20352248333654.3586699569488,17)==1521.8090132193388",0.0,0.43129023229778896 |
| "Prompt: Write a function to replace all occurrences of spaces, commas, or dots with a colon. Assesments: assert replace_specialchar('Python language, Programming language.')==('Python:language::Programming:language:'), assert replace_specialchar('a b c,d e f')==('a:b:c:d:e:f'), assert replace_specialchar('ram reshma,ram rahim')==('ram:reshma:ram:rahim')",92,0.033,38,2.4210526315789473,"Prompt: Write function replace spaces commas dots colonAssesments: assert replace_specialchar('Python Programming language replace_specialchar( b c,d e f_specialchar('ram reshma rahim",0.0,0.7755093022228113 |
| "Prompt: Write a function to find the index of the first occurrence of a given number in a sorted array. Assesments: assert find_first_occurrence([2, 5, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 1, assert find_first_occurrence([2, 3, 5, 5, 6, 6, 8, 9, 9, 9], 5) == 2, assert find_first_occurrence([2, 4, 1, 5, 6, 6, 8, 9, 9, 9], 6) == 4",151,0.033,74,2.0405405405405403,"Prompt: Write function find index first occurrence number sorted arrayAssesments: assert find_first_occurrence([2, 5 6 8 9 5) 1_first_occurrence([2 3 5 5 6 8 2 find_first_occurrence([2 4 5 6 8 9 6) 4",0.0,0.4644329468007048 |
| "Prompt: Write a python function to find sum of products of all possible subarrays. Assesments: assert sum_Of_Subarray_Prod([1,2,3],3) == 20, assert sum_Of_Subarray_Prod([1,2],2) == 5, assert sum_Of_Subarray_Prod([1,2,3,4],4) == 84",83,0.033,46,1.8043478260869565,"Prompt: Write python function find subarraysAssesments: assert([1,2,3],3) 20[1,2],2) 5[1,2,3,4],4) 84",0.0,0.2713406101315421 |
| "Prompt: Write a python function to toggle bits of the number except the first and the last bit. Assesments: assert toggle_middle_bits(9) == 15, assert toggle_middle_bits(10) == 12, assert toggle_middle_bits(11) == 13",56,0.033,30,1.8666666666666667,Prompt: Write python function toggle bits number first lastAssesments: assert toggle_bits(9) 15) 12(11) 13,0.0,0.32228752682153183 |
| "Prompt: Write a function to locate the left insertion point for a specified value in sorted order. Assesments: assert left_insertion([1,2,4,5],6)==4, assert left_insertion([1,2,4,5],3)==2, assert left_insertion([1,2,4,5],7)==4",73,0.033,35,2.085714285714286,"Prompt: Write function locate left point specified value sorted orderAssesments: assert left_insertion,4,5],6)==4,3)==2,7)==4",0.0,0.5013634001039543 |
| "Prompt: Write a function to check whether the given string is starting with a vowel or not using regex. Assesments: assert check_str(""annie"") == 'Valid', assert check_str(""dawood"") == 'Invalid', assert check_str(""Else"") == 'Valid'",57,0.033,34,1.6764705882352942,"Prompt: Write function check string starting vowel regexAssesments: assert check_str""annie"") 'Valid'""dawood"") 'Invalid'""Else"") 'Valid'",0.0,0.16679837342157686 |
| "Prompt: Write a function to calculate the geometric sum of n-1. Assesments: assert geometric_sum(7) == 1.9921875, assert geometric_sum(4) == 1.9375, assert geometric_sum(8) == 1.99609375",59,0.032,34,1.7352941176470589,Prompt: Write function calculate sum n-1.Assesments: assert(7) 1.9921875 1.9375 1.99609375,0.0,0.21488780230816087 |
| "Prompt: Write a python function to find the index of smallest triangular number with n digits. Assesments: assert find_Index(2) == 4, assert find_Index(3) == 14, assert find_Index(4) == 45",51,0.033,23,2.217391304347826,Prompt: Write python function find index smallest triangular number n digitsAssesments: assert 4 14 45,0.0,0.60901203470473 |
| "Prompt: Write a function to convert the given tuple to a key-value dictionary using adjacent elements. Assesments: assert tuple_to_dict((1, 5, 7, 10, 13, 5)) == {1: 5, 7: 10, 13: 5}, assert tuple_to_dict((1, 2, 3, 4, 5, 6)) == {1: 2, 3: 4, 5: 6}, assert tuple_to_dict((7, 8, 9, 10, 11, 12)) == {7: 8, 9: 10, 11: 12}",146,0.033,73,2.0,"Prompt: Write function convert tuple key-value dictionary elementsAssesments: assert tuple_to_dict((1 5 7 10 13, 5) 13 5((1 2 3 4 5 6) 6((7 8 9 10 11 12 8 9 10 11 12",0.0,0.43129023229778896 |
| "Prompt: Write a python function to check whether all the characters are same or not. Assesments: assert all_Characters_Same(""python"") == False, assert all_Characters_Same(""aaa"") == True, assert all_Characters_Same(""data"") == False",56,0.033,30,1.8666666666666667,"Prompt: Write python function check characters sameAssesments: assert all_Characters_Same(""python"") False""aaa"") True(""data"") False",0.0,0.32228752682153183 |
| "Prompt: Write a function to caluclate the area of a tetrahedron. Assesments: assert area_tetrahedron(3)==15.588457268119894, assert area_tetrahedron(20)==692.8203230275509, assert area_tetrahedron(10)==173.20508075688772",67,0.036,36,1.8611111111111112,Prompt: Write function area tetrahedronAssesments: assert.588457268119894(20)==692.8203230275509)==173.20508075688772,0.0,0.3177457474266878 |
| "Prompt: Write a function to rotate a given list by specified number of items to the right direction. Assesments: assert rotate_right([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],3,4)==[8, 9, 10, 1, 2, 3, 4, 5, 6], assert rotate_right([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],2,2)==[9, 10, 1, 2, 3, 4, 5, 6, 7, 8], assert rotate_right([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],5,2)==[6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8]",231,0.034,111,2.081081081081081,"Prompt: Write function rotate list items right directionAssesments: assert rotate_right([1, 2 3 4 5 6 7 8 9 10,3,4[8, 9 10 4 5 6 9 10,2[9 10 4 5 6 7 8 7 8 9 10,5[6, 7, 8 9 10 1 3 4 5 6 7 8]",0.0,0.497575661303621 |
| "Prompt: Write a function to check if the given tuple has any none value or not. Assesments: assert check_none((10, 4, 5, 6, None)) == True, assert check_none((7, 8, 9, 11, 14)) == False, assert check_none((1, 2, 3, 4, None)) == True",82,0.033,42,1.9523809523809523,Prompt: Write function check tuple noneAssesments: assert check_none((10 4 5 6 True(7 8 9 11 14 False 2 3 4 None True,0.0,0.39236069462769707 |
| "Prompt: Write a function to find numbers within a given range where every number is divisible by every digit it contains. Assesments: assert divisible_by_digits(1,22)==[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22], assert divisible_by_digits(1,15)==[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15], assert divisible_by_digits(20,25)==[22, 24]",135,0.034,63,2.142857142857143,Prompt: Write function find numbers range divisible digitAssesments: assert divisible_by_digits(1 2 9 11 12 15 22 divisible_by_digits(1[1 2 3 7 8 9 11 12 15 divisible_digits(20[22 24],0.0,0.5480788453080644 |
| "Prompt: Write a function to find area of a sector. Assesments: assert sector_area(4,45)==6.285714285714286, assert sector_area(9,45)==31.82142857142857, assert sector_area(9,360)==None",57,0.033,24,2.375,"Prompt: Write function find area sectorAssesments: assert,45)==6.285714285714286,360",0.0,0.7378603414497621 |
| "Prompt: Write a function to find the longest common subsequence for the given three string sequence. Assesments: assert lcs_of_three('AGGT12', '12TXAYB', '12XBA', 6, 7, 5) == 2, assert lcs_of_three('Reels', 'Reelsfor', 'ReelsforReels', 5, 8, 13) == 5 , assert lcs_of_three('abcd1e2', 'bc12ea', 'bd1ea', 7, 6, 5) == 3",124,0.033,64,1.9375,"Prompt: Write function find longest subsequence three string sequenceAssesments: assert_three('AGGT12 6, 7 5) 2 5, 8 13) 5('abcd1e2 'bc12ea 'bd1ea 7, 6 5) 3",0.0,0.38019521410579343 |
| "Prompt: Write a function to put spaces between words starting with capital letters in a given string by using regex. Assesments: assert capital_words_spaces(""Python"") == 'Python', assert capital_words_spaces(""PythonProgrammingExamples"") == 'Python Programming Examples', assert capital_words_spaces(""GetReadyToBeCodingFreak"") == 'Get Ready To Be Coding Freak'",74,0.034,43,1.7209302325581395,"Prompt: Write function put spaces between words capital letters string using regexAssesments: assert capital_words_spaces(""Python"") == 'Python'(""PythonProgrammingExamples"")(""GetReadyToBeCodingFreak"")' |
| Prompt: Write a function to sort a given list of strings of numbers numerically. Assesments: assert sort_numeric_strings( ['4','12','45','7','0','100','200','-12','-500'])==[-500, -12, 0, 4, 7, 12, 45, 100, 200], assert sort_numeric_strings(['2','3','8','4','7','9','8','2','6','5','1','6','1','2','3','4','6','9','1','2'])==[1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 9], assert sort_numeric_strings(['1','3','5','7','1', '3','13', '15', '17','5', '7 ','9','1', '11'])==[1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 11, 13, 15, 17]Prompt: Write function sort numericallyAssesments: assert sort_numeric_strings'4'45'7'200'-500'[-500 4 7 12 45 100 200 sort['2''3''8'4'7'9'6'5'4'9[1, 1 2 2 3 4 4 5 6 6 7, 8 9 9 sort_strings(['1''3'5'7''1'13 '15 '17''5 '7'9''1 '11'[1, 1, 3 5, 5 7, 7 9 11 13, 15 17] |
| Prompt: Write a function to add the given tuple to the given list. Assesments: assert add_tuple([5, 6, 7], (9, 10)) == [5, 6, 7, 9, 10], assert add_tuple([6, 7, 8], (10, 11)) == [6, 7, 8, 10, 11], assert add_tuple([7, 8, 9], (11, 12)) == [7, 8, 9, 11, 12]Prompt: Write function add tuple listAssesments: assert add_tuple([5, 6, 7] (9, 10 9 10[6, 7, 8 (10, 11 8 10, 11[7, 8 9 (11, 12 |
| Prompt: Write a function to check if the given array represents min heap or not. Assesments: assert check_min_heap([1, 2, 3, 4, 5, 6], 0) == True, assert check_min_heap([2, 3, 4, 5, 10, 15], 0) == True, assert check_min_heap([2, 10, 4, 5, 3, 15], 0) == False |
| Prompt: Write a function to find the nth jacobsthal number. Assesments: assert jacobsthal_num(5) == 11, assert jacobsthal_num(2) == 1, assert jacobsthal_num(4) == 5 |
| Prompt: Write a function to find minimum k records from tuple list. Assesments: assert min_k([('Manjeet', 10), ('Akshat', 4), ('Akash', 2), ('Nikhil', 8)], 2) == [('Akash', 2), ('Akshat', 4)], assert min_k([('Sanjeev', 11), ('Angat', 5), ('Akash', 3), ('Nepin', 9)], 3) == [('Akash', 3), ('Angat', 5), ('Nepin', 9)], assert min_k([('tanmay', 14), ('Amer', 11), ('Ayesha', 9), ('SKD', 16)], 1) == [('Ayesha', 9)]Prompt: Write function find minimum k records tuple listAssesments: assert min_k('Manjeet''Akshat 4) 2)'Nikhil' 8)'Akash assert min_k'Sanjeev' 11),'Angat' 5)'Akash' 3)'Nepin' 9)'Akash 9) assert min_k('tanmay' 14),'Amer' 11),'Ayesha' 9)'SKD' 16)' 9) |
| Prompt: Write a function to find common index elements from three lists. Assesments: assert extract_index_list([1, 1, 3, 4, 5, 6, 7],[0, 1, 2, 3, 4, 5, 7],[0, 1, 2, 3, 4, 5, 7])==[1, 7], assert extract_index_list([1, 1, 3, 4, 5, 6, 7],[0, 1, 2, 3, 4, 6, 5],[0, 1, 2, 3, 4, 6, 7])==[1, 6], assert extract_index_list([1, 1, 3, 4, 6, 5, 6],[0, 1, 2, 3, 4, 5, 7],[0, 1, 2, 3, 4, 5, 7])==[1, 5]Prompt: Write function find index elements three listsAssesments: assert extract_index_list(, 1, 3 4 5 6 7] 2 4 5 7[1, 7 extract_index_list( 1 3 4 5 6 7] 3 4 6 5 6 extract_index_list(, 1 3 4 6 5, 6] 1 2 3 4 5, 7][1, 5 |
| Prompt: Write a function to find the second smallest number in a list. Assesments: assert second_smallest([1, 2, -8, -2, 0, -2])==-2, assert second_smallest([1, 1, -0.5, 0, 2, -2, -2])==-0.5, assert second_smallest([2,2])==NonePrompt: Write function find second smallest number listAssesments: assert second_smallest 2 -8 -2 -0.5 2 -2 -2][2,2] |
| Prompt: Write a function that matches a string that has an a followed by zero or one 'b'. Assesments: assert text_match_zero_one(ac)==('Found a match!'), assert text_match_zero_one(dc)==('Not matched!'), assert text_match_zero_one(abbbba)==('Found a match!')Prompt: Write function matches string followed zero 'bAssesments: assert text_match_zero_one(""ac"")=='Found match(dc)=='Not matched('Found match!'",0.0,0.3845747870936787 |
| "Prompt: Write a function to count the pairs of reverse strings in the given string list. Assesments: assert count_reverse_pairs([""julia"", ""best"", ""tseb"", ""for"", ""ailuj""])== '2', assert count_reverse_pairs([""geeks"", ""best"", ""for"", ""skeeg""]) == '1', assert count_reverse_pairs([""makes"", ""best"", ""sekam"", ""for"", ""rof""]) == '2'",94,0.033,52,1.8076923076923077,"Prompt: Write function count reverse strings listAssesments: assert count_reverse_pairs(""julia"", ""tseb"", ""ailuj '2'_pairs(""geeks"", ""skeeg"" '1'_pairs(""makes"", ""rof"" '2'",0.0,0.27407479170703347 |
| "Prompt: Write a function to count number of unique lists within a list. Assesments: assert unique_sublists([[1, 3], [5, 7], [1, 3], [13, 15, 17], [5, 7], [9, 11]] )=={(1, 3): 2, (5, 7): 2, (13, 15, 17): 1, (9, 11): 1}, assert unique_sublists([['green', 'orange'], ['black'], ['green', 'orange'], ['white']])=={('green', 'orange'): 2, ('black',): 1, ('white',): 1}, assert unique_sublists([[10, 20, 30, 40], [60, 70, 50, 50], [90, 100, 200]])=={(10, 20, 30, 40): 1, (60, 70, 50, 50): 1, (90, 100, 200): 1}",237,0.034,129,1.8372093023255813,"Prompt: Write function count listsAssesments: assert unique_sublists(, 3, 7, 15, 17,, 3) 2 (5, 7) 2 (13, 15, 17): 1 (9, 11): 1 assert_sublists'green 2 1 1 assert_sublists[10, 20, 30, 40, 70, 50, 50, 100,, 20, 30, 40): 1 (60, 70, 50, 100, 200): 1 |
| Prompt: Write a function to check a decimal with a precision of 2. Assesments: assert is_decimal('123.11')==True, assert is_decimal('e666.86')==False, assert is_decimal('3.124587')==False |
| Prompt: Write a python function to check whether an array contains only one distinct element or not. Assesments: assert unique_Element([1,1,1],3) == 'YES', assert unique_Element([1,2,1,2],4) == 'NO', assert unique_Element([1,2,3,4,5],5) == 'NO'Prompt: Write python function check array elementAssesments: assert unique_Element([1,3) 'YES[1,2,4) 'NO([1,2,3,4,5],5)'",0.0,0.22691015952980684 |
| "Prompt: Write a function to caluclate arc length of an angle. Assesments: assert arc_length(9,45)==3.5357142857142856, assert arc_length(9,480)==None, assert arc_length(5,270)==11.785714285714285",61,0.033,25,2.44,"Prompt: Write function arc length angleAssesments: assert_length(9,480,270.785714285714285",0.0,0.7909991603694374 |
| "Prompt: Write a function to check whether the given month number contains 30 days or not. Assesments: assert check_monthnumber_number(6)==True, assert check_monthnumber_number(2)==False, assert check_monthnumber_number(12)==False",52,0.033,25,2.08,Prompt: Write function check month number 30 daysAssesments: assert check_monthnumber_number(6)==True)==False,0.0,0.4966918555835433 |
| "Prompt: Write a python function to find the minimum difference between any two elements in a given array. Assesments: assert find_Min_Diff((1,5,3,19,18,25),6) == 1, assert find_Min_Diff((4,3,2,6),4) == 1, assert find_Min_Diff((30,5,20,9),4) == 4",87,0.033,51,1.7058823529411764,"Prompt: Write python function minimum difference elements arrayAssesments: assert_Min_Diff((1,5,3,19,18,25),6) 1((4,3,2,6),4),20,9),4)",0.0,0.19084308786486878 |
| "Prompt: Write a python function to count numeric values in a given string. Assesments: assert number_ctr('program2bedone') == 1, assert number_ctr('3wonders') ==1, assert number_ctr('123') == 3",52,0.033,30,1.7333333333333334,Prompt: Write python function count numeric values stringAssesments: assert_ctr'program2bedone 1'3wonders'123 3,0.0,0.21328482134527477 |
| ,47,0.033,24,1.9583333333333333,Prompt: Write function find nth polite numberAssesments: assert_polite(7) 11 7 13,0.0,0.3972268868364585 |
| ,206,0.034,109,1.889908256880734,,0.0,0.3412879984183106 |
| ,89,0.033,51,1.7450980392156863,,0.0,0.22290270712259153 |
| ,55,0.033,29,1.896551724137931,Prompt: Write python function check odd parity numberAssesments: assert check_Odd_Parity(13)(21)_Parity(18) False,0.0,0.3467191677041412 |
| ,126,0.034,70,1.8,,0.0,0.2677861740834033 |
| ,60,0.033,30,2.0,Prompt: Write python function find sum fourth power first numbersAssesments: assert odd_Num_Sum(2) 82 707 3108,0.0,0.43129023229778896 |
| ,56,0.033,32,1.75,,0.0,0.22691015952980684 |
| ,94,0.035,51,1.8431372549019607,,0.0,0.30305175526689815 |
| ,99,0.034,46,2.152173913043478,,0.0,0.5556954939826474 |
| ,73,0.032,41,1.7804878048780488,,0.0,0.2518345586478535 |
| ,72,0.033,44,1.6363636363636365,,0.0,0.13401012645345142 |
| ,67,0.033,40,1.675,Prompt: Write function count characters vowels neighbors stringAssesments: assert count_vowels('bestinstareels 7'partofthejourneyistheend 12'amazonprime 5,0.0,0.16559613769941225 |
| "Prompt: Write a python function to find the sum of non-repeated elements in a given array. Assesments: assert find_Sum([1,2,3,1,1,4,5,6],8) == 21, assert find_Sum([1,10,9,4,2,10,10,45,4],9) == 71, assert find_Sum([12,10,9,45,2,10,10,45,10],9) == 78",108,0.033,52,2.076923076923077,"Prompt: Write python function find sum non-repeated elements arrayAssesments: assert find_Sum([1,2,3,5,6],8) == 21,([1,10,45,4,9 71( 78",0.0,0.4941764085340913 |
| "Prompt: Write a function to pack consecutive duplicates of a given list elements into sublists. Assesments: assert pack_consecutive_duplicates([0, 0, 1, 2, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 4, 4])==[[0, 0], [1], [2], [3], [4, 4], [5], [6, 6, 6], [7], [8], [9], [4, 4]], assert pack_consecutive_duplicates([10, 10, 15, 19, 18, 18, 17, 26, 26, 17, 18, 10])==[[10, 10], [15], [19], [18, 18], [17], [26, 26], [17], [18], [10]], assert pack_consecutive_duplicates(['a', 'a', 'b', 'c', 'd', 'd'])==[['a', 'a'], ['b'], ['c'], ['d', 'd']]",244,0.034,124,1.967741935483871,"Prompt: Write function pack duplicates list elements sublistsAssesments: assert pack_consecutive_duplicates([0 1 2 3 4 4 5 6 6 7 8 9 4 4] [1] [3] [4 4 [5] [6 6 [7] [8] [4 assert pack_duplicates([10, 10 15 19, 18 17, 26, 26, 10] [15] [18 [26 [18] pack_duplicates(['a' 'b 'c 'd''d'",0.0,0.4049186100051461 |
| "Prompt: Write a function to count the number of unique lists within a list. Assesments: assert unique_sublists([[1, 3], [5, 7], [1, 3], [13, 15, 17], [5, 7], [9, 11]])=={(1, 3): 2, (5, 7): 2, (13, 15, 17): 1, (9, 11): 1}, assert unique_sublists([['green', 'orange'], ['black'], ['green', 'orange'], ['white']])=={('green', 'orange'): 2, ('black',): 1, ('white',): 1}, assert unique_sublists([[1, 2], [3, 4], [4, 5], [6, 7]])=={(1, 2): 1, (3, 4): 1, (4, 5): 1, (6, 7): 1}",222,0.034,121,1.834710743801653,"Prompt: Write function count unique listsAssesments: assert unique_sublists([1, 3, 7, 15, 17,, 3) 2 (5, 7) (13, 15, 17): (9, 1_sublists'green 2 1 1_sublists([1, 2 [3, 4 [4, 5] [6, 7]], 2) 1 (3, 4) 1 (4, 5) 1 (6, 7) 1 |
| Prompt: Write a function to find the combinations of sums with tuples in the given tuple list. Assesments: assert find_combinations([(2, 4), (6, 7), (5, 1), (6, 10)]) == [(8, 11), (7, 5), (8, 14), (11, 8), (12, 17), (11, 11)], assert find_combinations([(3, 5), (7, 8), (6, 2), (7, 11)]) == [(10, 13), (9, 7), (10, 16), (13, 10), (14, 19), (13, 13)], assert find_combinations([(4, 6), (8, 9), (7, 3), (8, 12)]) == [(12, 15), (11, 9), (12, 18), (15, 12), (16, 21), (15, 15)]Prompt: Write function sums tuples listAssesments: find_combinations, 4) (6, 7) (5, (6 10(8, (7, 5) (11, (12,, 5) (7, 8) (6, 2) (7, 11, (9, 7) (13, (14,, 6) (8, 9) (7, 3) (8, 12), 15), (11, 9) (12, (15, (16, |
| Prompt: Write a python function to check whether the count of divisors is even or odd. Assesments: assert count_Divisors(10) == Even, assert count_Divisors(100) == Odd, assert count_Divisors(125) == EvenPrompt: Write python function check divisors even oddAssesments: assert_Divisors(10) Even,(100) Odd, Even |
| Prompt: Write a python function to find the sum of all odd length subarrays. Assesments: assert Odd_Length_Sum([1,2,4]) == 14, assert Odd_Length_Sum([1,2,1,2]) == 15, assert Odd_Length_Sum([1,7]) == 8Prompt: Write python function find odd length subarraysAssesments: assert_Length_Sum[1,2,4] 14[1,2 15[1,7] 8 |
| Prompt: Write a function to convert rgb color to hsv color. Assesments: assert rgb_to_hsv(255, 255, 255)==(0, 0.0, 100.0), assert rgb_to_hsv(0, 215, 0)==(120.0, 100.0, 84.31372549019608), assert rgb_to_hsv(10, 215, 110)==(149.26829268292684, 95.34883720930233, 84.31372549019608) |
| Prompt: Write a function to find the product of first even and odd number of a given list. Assesments: assert mul_even_odd([1,3,5,7,4,1,6,8])==4, assert mul_even_odd([1,2,3,4,5,6,7,8,9,10])==2, assert mul_even_odd([1,5,7,9,10])==10Prompt: Write function find even odd listAssesments: assert mul_even_odd(,3,5,7,4)==4,3,4,5,6,7,8,9,10[1,5,7,9,10] |
| Prompt: Write a function to convert tuple string to integer tuple. Assesments: assert tuple_str_int((7, 8, 9)) == (7, 8, 9), assert tuple_str_int((1, 2, 3)) == (1, 2, 3), assert tuple_str_int((4, 5, 6)) == (4, 5, 6)Prompt: Write function convert tuple string integer tupleAssesments: assert tuple_str_int((7, 8, 9))_int((1, 2, 3))_int((4, 5, 6)) |
| Prompt: Write a function to locate the right insertion point for a specified value in sorted order. Assesments: assert right_insertion([1,2,4,5],6)==4, assert right_insertion([1,2,4,5],3)==2, assert right_insertion([1,2,4,5],7)==4Prompt: Write function locate right point specified value sorted orderAssesments: assert_insertion[1,2,4,5],6)==4,3)==2,7)==4 |
| Prompt: Write a function that matches a string that has an a followed by three 'b'. Assesments: assert text_match_three(ac)==('Not matched!'), assert text_match_three(dc)==('Not matched!'), assert text_match_three(abbbba)==('Found a match!')Prompt: Write function matches string a followed three 'b'Assesments: assert text_match_three(ac)=='Not matched matched'Found match! |
| Prompt: Write a function to create a new tuple from the given string and list. Assesments: assert new_tuple([WEB, is], best) == ('WEB', 'is', 'best'), assert new_tuple([We, are], Developers) == ('We', 'are', 'Developers'), assert new_tuple([Part, is], Wrong) == ('Part', 'is', 'Wrong')Prompt: Write function create new tuple string listAssesments: assert new_tuple([WEB, is best) assert new_tuple([We, are Developers) assert new_tuple([Part, is] Wrong) |
| Prompt: Write a function to calculate the perimeter of a regular polygon. Assesments: assert perimeter_polygon(4,20)==80, assert perimeter_polygon(10,15)==150, assert perimeter_polygon(9,7)==63Prompt: Write function calculate perimeter regular polygonAssesments: assert,20)==80,15)==150(9,7)==63 |
| Prompt: Write a python function to check whether every even index contains even numbers of a given list. Assesments: assert even_position([3,2,1]) == False, assert even_position([1,2,3]) == False, assert even_position([2,1,4]) == TruePrompt: Write python function check index numbers listAssesments: assert even_position([3,2,1] False[1,2,3][2,1,4] True |
| Prompt: Write a function to remove the nested record from the given tuple. Assesments: assert remove_nested((1, 5, 7, (4, 6), 10)) == (1, 5, 7, 10), assert remove_nested((2, 6, 8, (5, 7), 11)) == (2, 6, 8, 11), assert remove_nested((3, 7, 9, (6, 8), 12)) == (3, 7, 9, 12)Prompt: Write function remove nested record tupleAssesments: assert remove_nested((1, 5, 7, (4, 6) 10, 6, 8, (5, 7) 11((3, 7, 9, (6, 8) 12 |
| Prompt: Write a python function to count the number of lists in a given number of lists. Assesments: assert count_list([[1, 3], [5, 7], [9, 11], [13, 15, 17]]) == 4, assert count_list([[1,2],[2,3],[4,5]]) == 3, assert count_list([[1,0],[2,0]]) == 2Prompt: Write python function count listsAssesments: assert count_list([1, 3, 7, 11 15 17]] 4[1,2][2,3][4,5]] 3[1,0][2,0]] 2 |
| Prompt: Write a python function to find the last position of an element in a sorted array. Assesments: assert last([1,2,3],1,3) == 0, assert last([1,1,1,2,3,4],1,6) == 2, assert last([2,3,2,3,6,8,9],3,8) == 3Prompt: Write python function find last element arrayAssesments: assert last([1,2,1,3) == 0,1,6) 2[2,3,3,8) 3 |
| Prompt: Write a function that matches a string that has an 'a' followed by anything, ending in 'b'. Assesments: assert text_starta_endb(aabbbb)==('Found a match!'), assert text_starta_endb(aabAbbbc)==('Not matched!'), assert text_starta_endb(accddbbjjj)==('Not matched!')Prompt: Write function matches string 'a' ending 'b'Assesments: assert text_starta_endbaabbbb)=='Found match'Not matchedaccddbbjjj)=='Not matched!' |
| Prompt: Write a function to find the n - cheap price items from a given dataset using heap queue algorithm. Assesments: assert cheap_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}],1)==[{'name': 'Item-1', 'price': 101.1}], assert cheap_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}],2)==[{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}], assert cheap_items([{'name': 'Item-1', 'price': 101.1},{'name': 'Item-2', 'price': 555.22}, {'name': 'Item-3', 'price': 45.09},{'name': 'Item-4', 'price': 22.75}],1)==[{'name': 'Item-4', 'price': 22.75}] |
| Prompt: Write function to find the sum of all items in the given dictionary. Assesments: assert return_sum({'a': 100, 'b':200, 'c':300}) == 600, assert return_sum({'a': 25, 'b':18, 'c':45}) == 88, assert return_sum({'a': 36, 'b':39, 'c':49}) == 124 |
| Prompt: Write a python function to find the sum of all odd natural numbers within the range l and r. Assesments: assert sum_in_Range(2,5) == 8, assert sum_in_Range(5,7) == 12, assert sum_in_Range(7,13) == 40Prompt: Write python function find sum odd numbers l rAssesments: assert sum(2,5) 8(5,7) 12,13) 40 |
| Prompt: Write a python function to find the sum of an array. Assesments: assert _sum([1, 2, 3]) == 6, assert _sum([15, 12, 13, 10]) == 50, assert _sum([0, 1, 2]) == 3 |
| Prompt: Write a python function to left rotate the bits of a given number. Assesments: assert left_Rotate(16,2) == 64, assert left_Rotate(10,2) == 40, assert left_Rotate(99,3) == 792Prompt: Write python function rotate bits numberAssesments: assert(16,2) 64,2) 40(99,3) 792 |
| Prompt: Write a function to remove all whitespaces from a string. Assesments: assert remove_all_spaces('python program')==('pythonprogram'), assert remove_all_spaces('python programming language')==('pythonprogramminglanguage'), assert remove_all_spaces('python program')==('pythonprogram') |
| Prompt: Write a python function to count the number of equal numbers from three given integers. Assesments: assert test_three_equal(1,1,1) == 3, assert test_three_equal(-1,-2,-3) == 0, assert test_three_equal(1,2,2) == 2Prompt: Write python function count equal three integersAssesments: assert_three_equal(1,1 3(-1,-2 0(1,2,2) 2 |
| Prompt: Write a python function to count the number of rotations required to generate a sorted array. Assesments: assert count_Rotation([3,2,1],3) == 1, assert count_Rotation([4,5,1,2,3],5) == 2, assert count_Rotation([7,8,9,1,2,3],6) == 3Prompt: Write python function count rotations sorted arrayAssesments:[3,2,1],3) 1[4,5,1,2,3],5) 2[7,8,9,3],6) |
| Prompt: Write a python function to check whether the given number is a perfect square or not. Assesments: assert is_Perfect_Square(10) == False, assert is_Perfect_Square(36) == True, assert is_Perfect_Square(14) == False |
| Prompt: Write a python function to check whether the product of numbers is even or not. Assesments: assert is_Product_Even([1,2,3],3) == True, assert is_Product_Even([1,2,1,4],4) == True, assert is_Product_Even([1,1],2) == FalsePrompt: Write python function check product numbersAssesments: assert_Even([1,2,3],3)[1,2,1,4],4)([1,1],2) False |
| Prompt: Write a function to find the list in a list of lists whose sum of elements is the highest. Assesments: assert max_sum_list([[1,2,3], [4,5,6], [10,11,12], [7,8,9]])==[10, 11, 12] , assert max_sum_list([[3,2,1], [6,5,4], [12,11,10]])==[12,11,10] , assert max_sum_list([[2,3,1]])==[2,3,1]Prompt: Write function find sum highestAssesments: assert max_sum_list[1,2,3] [4,5,6],11,12 [7,8,9]][10[3,2,1] [6,5,4],11,10]][2,3,1][2,3,1] |
| Prompt: Write a function to find maximum run of uppercase characters in the given string. Assesments: assert max_run_uppercase('GeMKSForGERksISBESt') == 5, assert max_run_uppercase('PrECIOusMOVemENTSYT') == 6, assert max_run_uppercase('GooGLEFluTTER') == 4 |
| Prompt: Write a python function to find the first odd number in a given list of numbers. Assesments: assert first_odd([1,3,5]) == 1, assert first_odd([2,4,1,3]) == 1, assert first_odd ([8,9,1]) == 9Prompt: Write python function find first odd listAssesments: assert first_odd([1,3,5]) 1[2,4,1,3][8,9,1] |
| Prompt: Write a function to check if the given tuples contain the k or not. Assesments: assert check_K((10, 4, 5, 6, 8), 6) == True, assert check_K((1, 2, 3, 4, 5, 6), 7) == False, assert check_K((7, 8, 9, 44, 11, 12), 11) == True |
| Prompt: Write a function to check if each element of second tuple is smaller than its corresponding index in first tuple. Assesments: assert check_smaller((1, 2, 3), (2, 3, 4)) == False, assert check_smaller((4, 5, 6), (3, 4, 5)) == True, assert check_smaller((11, 12, 13), (10, 11, 12)) == TruePrompt: Write function check element second tuple smaller firstAssesments: assert check_smaller((1 2 3) False assert((4 5 6) (3 4 5) True assert((11 12 13), True |
| Prompt: Write a function to iterate over elements repeating each as many times as its count. Assesments: assert count_variable(4,2,0,-2)==['p', 'p', 'p', 'p', 'q', 'q'] , assert count_variable(0,1,2,3)==['q', 'r', 'r', 's', 's', 's'] , assert count_variable(11,15,12,23)==['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'q', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 'r', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's', 's']Prompt: Write function iterate over elements repeating each many times countAssesments: assert count_variable(4,2,0,-2)==['p', 'p', 'p,, 'q','] assert count_variable(0,1,2,3)==['q', 'r', 'r', 's', 's', 's'] assert count_variable(11,15,12,23)==['p', 'p', 'p', 'p', 'p' 'p', 'q', 'q', 'q', 'q', 'q 'r', 'r', 'r', 'r' 's', 's', 's', 's', 's', 's'",0.0,0.3692714515957806 |
| "Prompt: Write a function to check if two lists of tuples are identical or not. Assesments: assert check_identical([(10, 4), (2, 5)], [(10, 4), (2, 5)]) == True, assert check_identical([(1, 2), (3, 7)], [(12, 14), (12, 45)]) == False, assert check_identical([(2, 14), (12, 25)], [(2, 14), (12, 25)]) == True",113,0.033,60,1.8833333333333333,"Prompt: Write function check lists tuplesAssesments: assert check_identical, 4) (2, 5) True check_identical[(1, 2) (3, 7), (12, 45) False assert check_identical, (12, 25) True",0.0,0.33591286500606393 |
| "Prompt: Write a function to abbreviate 'road' as 'rd.' in a given string. Assesments: assert road_rd(""ravipadu Road"")==('ravipadu Rd.'), assert road_rd(""palnadu Road"")==('palnadu Rd.'), assert road_rd(""eshwar enclave Road"")==('eshwar enclave Rd.')",71,0.033,36,1.9722222222222223,"Prompt: Write function abbreviate 'road' as 'rd.' stringAssesments: assert road_rd(""ravipadu Rd.""palnadu""eshwar enclave Rd.",0.0,0.4085813353235688 |
| "Prompt: Write a function to find length of the string. Assesments: assert string_length('python')==6, assert string_length('program')==7, assert string_length('language')==8",42,0.033,22,1.9090909090909092,Prompt: Write function find length stringAssesments: assert string_length'python)==6'language)==8,0.0,0.35697020583670463 |
| "Prompt: Write a function to find the area of a rombus. Assesments: assert rombus_area(10,20)==100, assert rombus_area(10,5)==25, assert rombus_area(4,2)==4",50,0.033,28,1.7857142857142858,"Prompt: Write function find area rombusAssesments: assert_area(10,20)==100,5)==25,2)==4",0.0,0.2561073127823758 |
| "Prompt: Write a function to sort the given array without using any sorting algorithm. the given array consists of only 0, 1, and 2. Assesments: assert sort_by_dnf([1,2,0,1,0,1,2,1,1], 9) == [0, 0, 1, 1, 1, 1, 1, 2, 2], assert sort_by_dnf([1,0,0,1,2,1,2,2,1,0], 10) == [0, 0, 0, 1, 1, 1, 1, 2, 2, 2], assert sort_by_dnf([2,2,1,0,0,0,1,1,2,1], 10) == [0, 0, 0, 1, 1, 1, 1, 2, 2, 2]",211,0.033,118,1.7881355932203389,"Prompt: Write function sort array algorithm 0 1 2.Assesments: assert sort_by_dnf([1,2,0,1,0,1,2,1,1] 9) 1 1 2 2_dnf([1,0,0,1,2,1,2,2,1,0] 10) 1 1 2_dnf([2,2,1,0,0,0,1,1,2,1] 10) 1 1 2 2",0.0,0.2580867807994989 |
| "Prompt: Write a function to clear the values of the given tuples. Assesments: assert clear_tuple((1, 5, 3, 6, 8)) == (), assert clear_tuple((2, 1, 4 ,5 ,6)) == (), assert clear_tuple((3, 2, 5, 6, 8)) == ()",76,0.033,41,1.853658536585366,Prompt: Write function clear values tuplesAssesments: assert clear_tuple((1 5 3 6 8)((2 1 4((3 2 5 6 8),0.0,0.31165311653116534 |
| "Prompt: Write a function to find numbers divisible by m or n from a list of numbers using lambda function. Assesments: assert div_of_nums([19, 65, 57, 39, 152, 639, 121, 44, 90, 190],19,13)==[19, 65, 57, 39, 152, 190], assert div_of_nums([1, 2, 3, 5, 7, 8, 10],2,5)==[2, 5, 8, 10], assert div_of_nums([10,15,14,13,18,12,20],10,5)==[10, 15, 20]",155,0.034,74,2.0945945945945947,"Prompt: Write function find numbers divisible m n lambdaAssesments: assert div_nums 65 57 39 152 121 44 90 190,13)== 57 190 2 3 5 7 8 10 5 8 10,15,14,13,18,12,20 15 20",0.0,0.5086232328045931 |
| "Prompt: Write a python function to count lower case letters in a given string. Assesments: assert lower_ctr('abc') == 3, assert lower_ctr('string') == 6, assert lower_ctr('Python') == 5",49,0.033,27,1.8148148148148149,Prompt: Write python function count lower case letters stringAssesments: assert lower_ctr'abc 3 6'Python 5,0.0,0.27989758580298746 |
| "Prompt: Write a function to count the frequency of consecutive duplicate elements in a given list of numbers. Assesments: assert count_duplic([1,2,2,2,4,4,4,5,5,5,5])==([1, 2, 4, 5], [1, 3, 3, 4]), assert count_duplic([2,2,3,1,2,6,7,9])==([2, 3, 1, 2, 6, 7, 9], [2, 1, 1, 1, 1, 1, 1]), assert count_duplic([2,1,5,6,8,3,4,9,10,11,8,12])==([2, 1, 5, 6, 8, 3, 4, 9, 10, 11, 8, 12], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])",242,0.034,129,1.875968992248062,"Prompt: Write function count elements numbersAssesments: assert count_duplic([1,2,2,2,4,4,4,5,5,5,5], 2 4 5 3 4[2,2,3,1,2,6,7,9[2, 3 1 2 6 7 9[2,1,5,6,8,3,4,9,10,11,8,12], 1, 5, 6, 8 3 4 9 10 11 8 12",0.0,0.32989236673848 |
| "Prompt: Write a function to check whether the given month number contains 28 days or not. Assesments: assert check_monthnum_number(2)==True, assert check_monthnum_number(1)==False, assert check_monthnum_number(3)==False",52,0.033,28,1.8571428571428572,Prompt: Write function check month number 28 daysAssesments: assert check_monthnum_number(2)==True_number(1)==False,0.0,0.3145016192875135 |
| "Prompt: Write a function to merge two dictionaries into a single expression. Assesments: assert merge_dictionaries({ ""R"": ""Red"", ""B"": ""Black"", ""P"": ""Pink"" }, { ""G"": ""Green"", ""W"": ""White"" })=={'B': 'Black', 'R': 'Red', 'P': 'Pink', 'G': 'Green', 'W': 'White'}, assert merge_dictionaries({ ""R"": ""Red"", ""B"": ""Black"", ""P"": ""Pink"" },{ ""O"": ""Orange"", ""W"": ""White"", ""B"": ""Black"" })=={'O': 'Orange', 'P': 'Pink', 'B': 'Black', 'W': 'White', 'R': 'Red'}, assert merge_dictionaries({ ""G"": ""Green"", ""W"": ""White"" },{ ""O"": ""Orange"", ""W"": ""White"", ""B"": ""Black"" })=={'W': 'White', 'O': 'Orange', 'G': 'Green', 'B': 'Black'}",225,0.034,115,1.9565217391304348,"Prompt: Write function merge dictionaries single expressionAssesments: assert merge_dictionaries( ""R ""B ""Pink ""G ""W ""White'B 'Pink 'W 'White merge ""R ""B ""P ""Pink ""O"" ""W ""B ""Black'O 'Orange 'P 'Pink 'B 'Black 'W 'White 'R 'Red merge_dictionaries ""G"" ""W"" ""White"" ""O"" ""W ""B"" ""Black""'W' 'White 'O 'Orange 'G 'Green 'B' 'Black' |
| Prompt: Write a function to return true if the password is valid. Assesments: assert pass_validity(password)==False, assert pass_validity(Password@10)==True, assert pass_validity(password@10)==FalsePrompt: Write function return true password validAssesments: assert pass_validity@10)==True@10)==False |
| Prompt: Write a function to check if the given string starts with a substring using regex. Assesments: assert check_substring(dreams for dreams makes life fun, makes) == 'string doesnt start with the given substring', assert check_substring(Hi there how are you Hi alex, Hi) == 'string starts with the given substring', assert check_substring(Its been a long day, been) == 'string doesnt start with the given substring'Prompt: Write function check if string starts substring regexAssesments: assert check_substring(dreams makes life == 'string doesnt start substring' check_substring(Hi alex, 'string starts substring( long day"", 'string doesnt start substring'",0.0,0.35114118415348217 |
| "Prompt: Write a python function to remove even numbers from a given list. Assesments: assert remove_even([1,3,5,2]) == [1,3,5], assert remove_even([5,6,7]) == [5,7], assert remove_even([1,2,3,4]) == [1,3]",73,0.033,42,1.7380952380952381,"Prompt: Write python function remove even numbers listAssesments: assert remove_even[1,3,5[5,6,7[1,2,3,4] [1,3]",0.0,0.21717777511228392 |
| "Prompt: Write a python function to access multiple elements of specified index from a given list. Assesments: assert access_elements([2,3,8,4,7,9],[0,3,5]) == [2, 4, 9], assert access_elements([1, 2, 3, 4, 5],[1,2]) == [2,3], assert access_elements([1,0,2,3],[0,1]) == [1,0]",104,0.033,62,1.6774193548387097,"Prompt: Write python function access elements index listAssesments: assert access_elements(,8,4,7,9,3,5[1 3 4 5[1,2 [2,3[1,0,2,3[0,1] [1,0",0.0,0.1675740093713605 |
| "Prompt: Write a python function to find the type of triangle from the given sides. Assesments: assert check_Type_Of_Triangle(1,2,3) == ""Obtuse-angled Triangle"", assert check_Type_Of_Triangle(2,2,2) == ""Acute-angled Triangle"", assert check_Type_Of_Triangle(1,0,1) == ""Right-angled Triangle""",86,0.034,42,2.0476190476190474,"Prompt: Write python function find type triangle sidesAssesments: assert,2,3) ""Obtuse-angled,2,2)-angled(1,0,1) ""Right-angled Triangle",0.0,0.4702197699678806 |
| "Prompt: Write a function to sum a specific column of a list in a given list of lists. Assesments: assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],0)==12, assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],1)==15, assert sum_column( [[1,2,3,2],[4,5,6,2],[7,8,9,5],],3)==9",125,0.033,67,1.8656716417910448,"Prompt: Write function sum specific column list givenAssesments: assert sum_column( [[1,2,3,2],[4,5,6,2][7,8,9,5],,0)==12 assert[7,8,9,5],1)==15,9,5],3)==9",0.0,0.3214740737955897 |
| "Prompt: Write a function to count alphabets,digits and special charactes in a given string. Assesments: assert count_alpha_dig_spl(""abc!@#123"")==(3,3,3), assert count_alpha_dig_spl(""dgsuy@#$%&1255"")==(5,4,5), assert count_alpha_dig_spl(""fjdsif627348#%$^&"")==(6,6,5)",97,0.033,50,1.94,"Prompt: Write function count special charactes stringAssesments: assert count_alpha_dig!#123"")==(3,3""dgsuy#$%,4,5),""fjdsif627348#%$^,6,5)",0.0,0.38223901483347317 |
| "Prompt: Write a function to find out the second most repeated (or frequent) string in the given sequence. Assesments: assert second_frequent(['aaa','bbb','ccc','bbb','aaa','aaa']) == 'bbb', assert second_frequent(['abc','bcd','abc','bcd','bcd','bcd']) == 'abc', assert second_frequent(['cdma','gsm','hspa','gsm','cdma','cdma']) == 'gsm'",97,0.033,51,1.9019607843137254,"Prompt: Write function find second repeated string sequenceAssesments: assert second_frequent(['aaa','bbb == 'bbb' assert second_frequent(['abc''bcd' 'abc second_frequent(['cdma','gsm''cdma 'gsm' |
| Prompt: Write a function to round up a number to specific digits. Assesments: assert round_up(123.01247,0)==124, assert round_up(123.01247,1)==123.1, assert round_up(123.01247,2)==123.02Prompt: Write function round number digitsAssesments: assert round_up(123.01247,0)==124,1)==123.1.02 |
| Prompt: Write a python function to count equal element pairs from the given array. Assesments: assert count_Pairs([1,1,1,1],4) == 6, assert count_Pairs([1,5,1],3) == 1, assert count_Pairs([3,2,1,7,8,9],6) == 0Prompt: Write python function count pairs arrayAssesments: count[1,1,4) 6[1,5,1],3) 1[3,2,1,7,6) |
| Prompt: Write a function to extract the maximum numeric value from a string by using regex. Assesments: assert extract_max('100klh564abc365bg') == 564, assert extract_max('hello300how546mer231') == 546, assert extract_max('its233beenalong343journey234') == 343 |
| Prompt: Write a function to get dictionary keys as a list. Assesments: assert get_key({1:'python',2:'java'})==[1,2], assert get_key({10:'red',20:'blue',30:'black'})==[10,20,30], assert get_key({27:'language',39:'java',44:'little'})==[27,39,44]Prompt: Write function get dictionary keysAssesments: assert get_key'python'java[1,2]{10'red'blue'black[10,20,30_key{27'language'java'little[27,39,44] |
| Prompt: Write a function to generate a square matrix filled with elements from 1 to n raised to the power of 2 in spiral order. Assesments: assert generate_matrix(3)==[[1, 2, 3], [8, 9, 4], [7, 6, 5]] , assert generate_matrix(2)==[[1,2],[4,3]], assert generate_matrix(7)==[[1, 2, 3, 4, 5, 6, 7], [24, 25, 26, 27, 28, 29, 8], [23, 40, 41, 42, 43, 30, 9], [22, 39, 48, 49, 44, 31, 10], [21, 38, 47, 46, 45, 32, 11], [20, 37, 36, 35, 34, 33, 12], [19, 18, 17, 16, 15, 14, 13]]Prompt: Write function generate matrix elements 1 n 2 orderAssesments: assert generate 2 3 9 4 6 2 3 4 5 6 7 25 26, 27, 28, 29, 8 40 41 42 43 30 9 39 48 49 44 31, 10 38 47 46 45 32 11 37 36 35 34 33 12 18 17, 16 15 14 |
| Prompt: Write a python function to find the slope of a line. Assesments: assert slope(4,2,2,5) == -1.5, assert slope(2,4,4,6) == 1, assert slope(1,2,4,2) == 0Prompt: Write python slope lineAssesments:,2,2,5) -1.5,4,4,6) 1(1,2,4,2) |
| Prompt: Write a function to find length of the subarray having maximum sum. Assesments: assert max_sub_array_sum([-2, -3, 4, -1, -2, 1, 5, -3],8) == 5, assert max_sub_array_sum([1, -2, 1, 1, -2, 1],6) == 2, assert max_sub_array_sum([-1, -2, 3, 4, 5],5) == 3Prompt: Write function find length subarray maximum sumAssesments: assert max_sub_array_sum([-2 -3 4 1 5 -3] 5([1 -2[-1 -2 3 4 5],5) 3 |
| Prompt: Write a python function to find the cube sum of first n odd natural numbers. Assesments: assert cube_Sum(2) == 28, assert cube_Sum(3) == 153, assert cube_Sum(4) == 496Prompt: Write python function find cube sum odd numbersAssesments: assert_Sum(2) == 28, 153 496 |
| Prompt: Write a python function to find minimum number swaps required to make two binary strings equal. Assesments: assert min_Swaps(0011,1111) == 1, assert min_Swaps(00011,01001) == 2, assert min_Swaps(111,111) == 0Prompt: Write python function find swaps binary strings equalAssesments: assert min_Swaps(0011,1111) == 1 2111, |
| Prompt: Write a function to sort the tuples alphabetically by the first item of each tuple. Assesments: assert sort_tuple([(Amana, 28), (Zenat, 30), (Abhishek, 29),(Nikhil, 21), (B, C)]) == [('Abhishek', 29), ('Amana', 28), ('B', 'C'), ('Nikhil', 21), ('Zenat', 30)], assert sort_tuple([(aaaa, 28), (aa, 30), (bab, 29), (bb, 21), (csa, C)]) == [('aa', 30), ('aaaa', 28), ('bab', 29), ('bb', 21), ('csa', 'C')], assert sort_tuple([(Sarala, 28), (Ayesha, 30), (Suman, 29),(Sai, 21), (G, H)]) == [('Ayesha', 30), ('G', 'H'), ('Sai', 21), ('Sarala', 28), ('Suman', 29)]Prompt: Write function sort tuples alphabetically first itemAssesments: assert sort_tuple(Amana, (Abhishek,Nikhil, (B, C)'Abhishek'Amana'B' 'C'Nikhil'Zenat 30 assert sort_tuple""aaaa"", 28), (""aa"", (""bb"", (""csa"", ""C"")('aa''aaaa''bab''bb''csa' 'C' assert sort_tuple""Sarala"", (""Ayesha"", (""Suman"",""Sai"", 21), (""G"", ""H"")'Ayesha''G' 'H'Sai''Sarala''Suman' 29) |
| Prompt: Write a python function to check whether the roots of a quadratic equation are numerically equal but opposite in sign or not. Assesments: assert Check_Solution(2,0,-1) == Yes, assert Check_Solution(1,-5,6) == No, assert Check_Solution(2,0,2) == YesPrompt: Write python function check roots quadratic equation equal opposite signAssesments: assert Check_Solution(2,0,-1),-5,6)(2,0,2) Yes |
| Prompt: Write a function to count the number of inversions in the given array. Assesments: assert get_inv_count([1, 20, 6, 4, 5], 5) == 5, assert get_inv_count([8, 4, 2, 1], 4) == 6, assert get_inv_count([3, 1, 2], 3) == 2Prompt: Write function count inversions arrayAssesments: assert_inv_count( 20 6 4 5 5)[8 4 2, 1] 4)[3, 1 2] 3) |
| Prompt: Write a function to find the number which occurs for odd number of times in the given array. Assesments: assert get_odd_occurence([2, 3, 5, 4, 5, 2, 4, 3, 5, 2, 4, 4, 2], 13) == 5, assert get_odd_occurence([1, 2, 3, 2, 3, 1, 3], 7) == 3, assert get_odd_occurence([5, 7, 2, 7, 5, 2, 5], 7) == 5Prompt: Write function find number odd times arrayAssesments: assert get_odd_occurence([2, 3 5 4] 13) == 5 assert_odd_occurence([1, 2 3 7) assert_odd_occurence([5, 7, 2 5 5], 7) 5 |
| Prompt: Write a function to find the nth super ugly number from a given prime list of size k using heap queue algorithm. Assesments: assert nth_super_ugly_number(12,[2,7,13,19])==32, assert nth_super_ugly_number(10,[2,7,13,19])==26, assert nth_super_ugly_number(100,[2,7,13,19])==5408Prompt: Write function find nth ugly number prime list k heap queue algorithmAssesments: assert_ugly_number(12,[2,7,13,19])==32,)==26(100,)==5408 |
| Prompt: Write a python function to find the kth element in an array containing odd elements first and then even elements. Assesments: assert get_Number(8,5) == 2, assert get_Number(7,2) == 3, assert get_Number(5,2) == 3Prompt: Write python function find kth element array odd evenAssesments: assert_Number(8,5) 2(7,2) 3,2) 3 |
| Prompt: Write a python function to count the number of digits in factorial of a given number. Assesments: assert find_Digits(7) == 4, assert find_Digits(5) == 3, assert find_Digits(4) == 2 |
| Prompt: Write a function to find the minimum number of platforms required for a railway/bus station. Assesments: assert find_platform([900, 940, 950, 1100, 1500, 1800],[910, 1200, 1120, 1130, 1900, 2000],6)==3, assert find_platform([100,200,300,400],[700,800,900,1000],4)==4, assert find_platform([5,6,7,8],[4,3,2,1],4)==1Prompt: Write function minimum platforms stationAssesments: assert find_platform( 940 950 1100 1500 1800 1200 1120 1130 1900 2000,200,300,800,900,1000,7,8,3,2,1] |
| Prompt: Write a python function to copy a list from a singleton tuple. Assesments: assert lcopy([1, 2, 3]) == [1, 2, 3], assert lcopy([4, 8, 2, 10, 15, 18]) == [4, 8, 2, 10, 15, 18], assert lcopy([4, 5, 6]) == [4, 5, 6]Prompt: Write python function copy list singleton tupleAssesments: assert lcopy([1, 2, 3]([4, 8, 2, 10, 15, 18] lcopy([4, 5, 6] |
| Prompt: Write a function to find the area of a trapezium. Assesments: assert area_trapezium(6,9,4)==30, assert area_trapezium(10,20,30)==450, assert area_trapezium(15,25,35)==700Prompt: Write function find area trapeziumAssesments: assert(6,9,4)==30,20,30)==450,25,35)==700 |
| Prompt: Write a python function to find sum of all prime divisors of a given number. Assesments: assert Sum(60) == 10, assert Sum(39) == 16, assert Sum(40) == 7 |
| Prompt: Write a function to check if a triangle of positive area is possible with the given angles. Assesments: assert is_triangleexists(50,60,70)==True, assert is_triangleexists(90,45,45)==True, assert is_triangleexists(150,30,70)==FalsePrompt: Write function check triangle positive possible anglesAssesments: assert_triangleexists(50,60,70)==True(90,45(150,30,70)==False |
| Prompt: Write a python function to find sum of inverse of divisors. Assesments: assert Sum_of_Inverse_Divisors(6,12) == 2, assert Sum_of_Inverse_Divisors(9,13) == 1.44, assert Sum_of_Inverse_Divisors(1,4) == 4Prompt: Write python function find sum divisorsAssesments: assert,12) == 2(9,13) 1.44(1,4) 4 |
| Prompt: Write a python function to remove negative numbers from a list. Assesments: assert remove_negs([1,-2,3,-4]) == [1,3], assert remove_negs([1,2,3,-4]) == [1,2,3], assert remove_negs([4,5,-6,7,-8]) == [4,5,7]Prompt: Write python function remove negative numbers listAssesments: assert remove_negs[1,-2,3,-4 [1,3],3,2,3[4,5-6,7,-8 |
| Prompt: Write a python function to find sum of odd factors of a number. Assesments: assert sum_of_odd_Factors(30) == 24, assert sum_of_odd_Factors(18) == 13, assert sum_of_odd_Factors(2) == 1Prompt: Write python function find odd factors numberAssesments: assert(30) == 24) == 13, 1 |
| Prompt: Write a function which accepts an arbitrary list and converts it to a heap using heap queue algorithm. Assesments: assert raw_heap([25, 44, 68, 21, 39, 23, 89])==[21, 25, 23, 44, 39, 68, 89], assert raw_heap([25, 35, 22, 85, 14, 65, 75, 25, 58])== [14, 25, 22, 25, 35, 65, 75, 85, 58], assert raw_heap([4, 5, 6, 2])==[2, 4, 6, 5]Prompt: Write function accepts list converts heap queue algorithmAssesments: assert raw_heap([25, 44 68 21, 39 23, 89 25 assert raw_heap([25 35 22, 85 14 65 75 25 58 raw_heap([4, 5 6, 2] |
| Prompt: Write a python function to check for even parity of a given number. Assesments: assert check_Even_Parity(10) == True, assert check_Even_Parity(11) == False, assert check_Even_Parity(18) == True |
| Prompt: Write a python function to find minimum adjacent swaps required to sort binary array. Assesments: assert find_Min_Swaps([1,0,1,0],4) == 3, assert find_Min_Swaps([0,1,0],3) == 1, assert find_Min_Swaps([0,0,1,1,0],5) == 2Prompt: Write python function find swaps binary arrayAssesments: assert_Swaps(,1,0,4) 3,1,0,3) 1,1,0],5) 2 |
| Prompt: Write a function to list out the list of given strings individually using map function. Assesments: assert listify_list(['Red', 'Blue', 'Black', 'White', 'Pink'])==[['R', 'e', 'd'], ['B', 'l', 'u', 'e'], ['B', 'l', 'a', 'c', 'k'], ['W', 'h', 'i', 't', 'e'], ['P', 'i', 'n', 'k']], assert listify_list(['python'])==[['p', 'y', 't', 'h', 'o', 'n']], assert listify_list([' red ', 'green',' black', 'blue ',' orange', 'brown'])==[[' ', 'r', 'e', 'd', ' '], ['g', 'r', 'e', 'e', 'n'], [' ', 'b', 'l', 'a', 'c', 'k'], ['b', 'l', 'u', 'e', ' '], [' ', 'o', 'r', 'a', 'n', 'g', 'e'], ['b', 'r', 'o', 'w', 'n']] |
| Prompt: Write a function to count number of lists in a given list of lists and square the count. Assesments: assert count_list([[0], [1, 3], [5, 7], [9, 11], [13, 15, 17]])==25, assert count_list([[1, 3], [5, 7], [9, 11], [13, 15, 17]] )==16, assert count_list([[2, 4], [[6,8], [4,5,8]], [10, 12, 14]])==9Prompt: Write function count countAssesments: assert count_list([0 [1, 3, 7, 11, 15 17]])==25[1, 3, 7, 11 15([2, 4] [[6,8] [4,5,8]] [10, 12 14]])==9 |
| Prompt: Write a function to generate all sublists of a given list. Assesments: assert sub_lists([10, 20, 30, 40])==[[], [10], [20], [30], [40], [10, 20], [10, 30], [10, 40], [20, 30], [20, 40], [30, 40], [10, 20, 30], [10, 20, 40], [10, 30, 40], [20, 30, 40], [10, 20, 30, 40]], assert sub_lists(['X', 'Y', 'Z'])==[[], ['X'], ['Y'], ['Z'], ['X', 'Y'], ['X', 'Z'], ['Y', 'Z'], ['X', 'Y', 'Z']], assert sub_lists([1,2,3])==[[],[1],[2],[3],[1,2],[1,3],[2,3],[1,2,3]]Prompt: Write function generate sublists given listAssesments: assert sub_lists([10, 20, 30, 40])==[[] [10] [20] [10, 20] [10, 30] 40] assert sub_lists(['X', 'Y', 'Z'])==[[] ['X'] ['Y'] ['Z'] [ assert sub_lists([1,2,3])==[[],[1],[2],[3],[1,2],[1,3],[2,3],[1,2,3]] |
| Prompt: Write a function to check whether the given string is ending with only alphanumeric characters or not using regex. Assesments: assert check_alphanumeric(dawood@) == 'Discard', assert check_alphanumeric(skdmsam326) == 'Accept', assert check_alphanumeric(cooltricks@) == 'Discard'Prompt: Write function check string alphanumeric characters regexAssesments: assert check_alphanumericdawood@) 'Discard""skdmsam326"") 'Acceptcooltricks@) 'Discard",0.0,0.1587834686071462 |
| "Prompt: Write a function to find all anagrams of a string in a given list of strings using lambda function. Assesments: assert anagram_lambda([""bcda"", ""abce"", ""cbda"", ""cbea"", ""adcb""],""abcd"")==['bcda', 'cbda', 'adcb'], assert anagram_lambda([""recitals"","" python""], ""articles"" )==[""recitals""], assert anagram_lambda(["" keep"","" abcdef"","" xyz""],"" peek"")==["" keep""]",103,0.033,55,1.8727272727272728,"Prompt: Write function find anagrams string list lambda functionAssesments: assert anagram_lambda(""abcd"")=='bcda 'adcb assert anagram_lambda(""recitals"", python ""articles""recitals assert anagram_lambda( abcdef"", xyz peek"")== keep]",0.0,0.32724219525227083 |
| "Prompt: Write a function to find the occurrences of n most common words in a given text. Assesments: assert n_common_words(""python is a programming language"",1)==[('python', 1)], assert n_common_words(""python is a programming language"",1)==[('python', 1)], assert n_common_words(""python is a programming language"",5)==[('python', 1),('is', 1), ('a', 1), ('programming', 1), ('language', 1)]",108,0.034,60,1.8,"Prompt: Write function find n common words textAssesments: assert n_common_words(""python programming language"",1)=='python', 1)]'python', 1)(""python programming language"",5)==[('python', 1)'is''a','programming''language', 1)]",0.0,0.2677861740834033 |
| "Prompt: Write a function to find the length of the longest sub-sequence such that elements in the subsequences are consecutive integers. Assesments: assert find_longest_conseq_subseq([1, 2, 2, 3], 4) == 3, assert find_longest_conseq_subseq([1, 9, 3, 10, 4, 20, 2], 7) == 4, assert find_longest_conseq_subseq([36, 41, 56, 35, 44, 33, 34, 92, 43, 32, 42], 11) == 5",140,0.033,70,2.0,Prompt: Write function find length longest sub-sequence integersAssesments: assert find_longest_conseq([1 2 3 4)([1 9 3 10 20 2 7)([36 41 56 35 44 33 34 92 43 32 42] 11,0.0,0.43129023229778896 |
| "Prompt: Write a function to find palindromes in a given list of strings using lambda function. Assesments: assert palindrome_lambda([""php"", ""res"", ""Python"", ""abcd"", ""Java"", ""aaa""])==['php', 'aaa'], assert palindrome_lambda([""abcd"", ""Python"", ""abba"", ""aba""])==['abba', 'aba'], assert palindrome_lambda([""abcd"", ""abbccbba"", ""abba"", ""aba""])==['abbccbba', 'abba', 'aba']",103,0.033,53,1.9433962264150944,"Prompt: Write function find palindromes strings using lambdaAssesments: assert palindrome_lambda(""['php' 'aaa' palindrome_lambda""['abba' 'aba' palindrome_lambda([""abcd"", ""aba""['abbccbba' 'abba' 'aba'",0.0,0.3850154988408873 |
| "Prompt: Write a function to print n-times a list using map function. Assesments: assert ntimes_list([1, 2, 3, 4, 5, 6, 7],3)==[3, 6, 9, 12, 15, 18, 21], assert ntimes_list([1, 2, 3, 4, 5, 6, 7],4)==[4, 8, 12, 16, 20, 24, 28], assert ntimes_list([1, 2, 3, 4, 5, 6, 7],10)==[10, 20, 30, 40, 50, 60, 70]",163,0.034,75,2.1733333333333333,Prompt: Write function print n-times list mapAssesments: assert ntimes_list 2 5 6 7[3 6 9 12 15 18 21_list 6 7[4 8 12 16 20 24 28 7[10 20 30 40 50 60 70],0.0,0.5729937494169232 |
| "Prompt: Write a function to check whether the given month name contains 31 days or not. Assesments: assert check_monthnumb(""February"")==False, assert check_monthnumb(""January"")==True, assert check_monthnumb(""March"")==True",52,0.033,30,1.7333333333333334,"Prompt: Write function check month 31 daysAssesments: assert check_monthnumb""February"")==False""January"")==True""March"")==True",0.0,0.21328482134527477 |
| "Prompt: Write a python function to add a minimum number such that the sum of array becomes even. Assesments: assert min_Num([1,2,3,4,5,6,7,8,9],9) == 1, assert min_Num([1,2,3,4,5,6,7,8],8) == 2, assert min_Num([1,2,3],3) == 2",93,0.034,50,1.86,"Prompt: Write python function add minimum number sum array evenAssesments: assert min_Num([1,2,3,4,5,9 1,3,4,8) 2[1,2,3],3)",0.0,0.31683739154771906 |
| "Prompt: Write a python function to find the length of the last word in a given string. Assesments: assert length_Of_Last_Word(""python language"") == 8, assert length_Of_Last_Word(""PHP"") == 3, assert length_Of_Last_Word("""") == 0",63,0.034,32,1.96875,"Prompt: Write python function find length last word stringAssesments: assert length_Word""python == 8""PHP"") 3"""") 0",0.0,0.40574272320179117 |
| "Prompt: Write a function to remove sublists from a given list of lists, which are outside a given range. Assesments: assert remove_list_range([[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7], [9, 11], [13, 14, 15, 17]],13,17)==[[13, 14, 15, 17]], assert remove_list_range([[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7], [9, 11], [13, 14, 15, 17]],1,3)==[[2], [1, 2, 3]], assert remove_list_range([[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7], [9, 11], [13, 14, 15, 17]],0,7)==[[2], [0], [1, 2, 3], [0, 1, 2, 3, 6, 7]]",261,0.034,138,1.891304347826087,"Prompt: Write function remove sublists outside rangeAssesments: assert remove_list_range([[2], [0] [1, 2, 3] 6, 7] [9, 11 [13, 14, 15, 17]] remove_list_range([[2] [0] [1, 2, 3] 6, 7] [9, 11] 14 15,1,3)== remove_list_range( 2 3 6, 7] [9, 11 [13, 14, 15, 17]],0,7)==[[2] 6, 7]]",0.0,0.34242933109431845 |
| "Prompt: Write a function to calculate the sum of the positive numbers of a given list of numbers using lambda function. Assesments: assert sum_positivenum([2, 4, -6, -9, 11, -12, 14, -5, 17])==48, assert sum_positivenum([10,15,-14,13,-18,12,-20])==50, assert sum_positivenum([19, -65, 57, 39, 152,-639, 121, 44, 90, -190])==522",124,0.033,62,2.0,"Prompt: Write function calculate positive numbers lambdaAssesments: assert sum_positivenum([2 4 -6 -9 11 14 -5 17,15,-14,13,-18[19 -65 57 39 152-639 121 44 90 -190",0.0,0.43129023229778896 |
| "Prompt: Write a python function to check whether the given strings are rotations of each other or not. Assesments: assert are_Rotations(""abc"",""cba"") == False, assert are_Rotations(""abcd"",""cdba"") == False, assert are_Rotations(""abacd"",""cdaba"") == True",66,0.033,38,1.736842105263158,"Prompt: Write python function check strings rotationsAssesments: assert_Rotations(""abc"",""cba"") == False(""abcd"",""cdba"")""abacd"",""cdaba"") True",0.0,0.21615331359464995 |
| "Prompt: Write a function to check if a nested list is a subset of another nested list. Assesments: assert check_subset([[1, 3], [5, 7], [9, 11], [13, 15, 17]] ,[[1, 3],[13,15,17]])==True, assert check_subset([[1, 2], [2, 3], [3, 4], [5, 6]],[[3, 4], [5, 6]])==True, assert check_subset([[[1, 2], [2, 3]], [[3, 4], [5, 7]]],[[[3, 4], [5, 6]]])==False",156,0.034,79,1.9746835443037976,"Prompt: Write function check nested list subsetAssesments: assert check_subset, 3], 7] [9, 11, 15,, 3 check_subset, 2] [2, 3 [3, 4] [5, 6]], 4, 2 [2,, 4 [5, 7, 4 [5, 6",0.0,0.41059351606811995 |
| "Prompt: Write a function to solve the fibonacci sequence using recursion. Assesments: assert fibonacci(7) == 13, assert fibonacci(8) == 21, assert fibonacci(9) == 34",43,0.033,24,1.7916666666666667,"Prompt: Write function solve fibonacci sequence recursionAssesments:(7) 13,(8) 21, 34",0.0,0.26097350499113725 |
| "Prompt: Write a python function to check if the string is a concatenation of another string. Assesments: assert check_Concat(""abcabcabc"",""abc"") == True, assert check_Concat(""abcab"",""abc"") == False, assert check_Concat(""aba"",""ab"") == False",61,0.033,30,2.033333333333333,"Prompt: Write python function check string concatenationAssesments: assert check_Concat( == True(""abcab"", == False_Concat( False",0.0,0.4585409086668531 |
| "Prompt: Write a function to find the minimum difference in the tuple pairs of given tuples. Assesments: assert min_difference([(3, 5), (1, 7), (10, 3), (1, 2)]) == 1, assert min_difference([(4, 6), (12, 8), (11, 4), (2, 13)]) == 2, assert min_difference([(5, 17), (3, 9), (12, 5), (3, 24)]) == 6",114,0.034,65,1.7538461538461538,"Prompt: Write function minimum difference pairsAssesments: assert min_difference, 5) (1, 7) (10, 3), 6) (12, 8) (11, 4) (2, 13, (3, 9) (12 5) 24)",0.0,0.23005446834162194 |
| "Prompt: Write a python function to find lcm of two positive integers. Assesments: assert lcm(4,6) == 12, assert lcm(15,17) == 255, assert lcm(2,6) == 6",54,0.033,31,1.7419354838709677,"Prompt: Write python function find integersAssesments: assert(4,6) 12,17) 255(2,6) 6",0.0,0.22031725395664614 |
| "Prompt: Write a python function to sort the given string. Assesments: assert sort_String(""cba"") == ""abc"", assert sort_String(""data"") == ""aadt"", assert sort_String(""zxy"") == ""xyz""",49,0.033,24,2.0416666666666665,"Prompt: Write python function sort stringAssesments: assert sort_String(""cba"") ""abc"", ""xyz""",0.0,0.4653535777591192 |
| "Prompt: Write a function to check if the given tuple contains only k elements. Assesments: assert check_tuples((3, 5, 6, 5, 3, 6),[3, 6, 5]) == True, assert check_tuples((4, 5, 6, 4, 6, 5),[4, 5, 6]) == True, assert check_tuples((9, 8, 7, 6, 8, 9),[9, 8, 1]) == False",121,0.034,61,1.9836065573770492,"Prompt: Write function check tuple k elementsAssesments: assert check_tuples((3, 5, 6 6) True((4, 5 6 5)((9, 8, 7, 6, 8 9)[9 8 1] False",0.0,0.4178882603130032 |
| "Prompt: Write a function that matches a string that has an 'a' followed by anything, ending in 'b' by using regex. Assesments: assert text_match(""aabbbbd"") == 'Not matched!', assert text_match(""aabAbbbc"") == 'Not matched!', assert text_match(""accddbbjjjb"") == 'Found a match!'",76,0.033,46,1.6521739130434783,"Prompt: Write function string 'a' ending 'b' regexAssesments: assert text_match(""aabbbbd"") 'Not matchedaabAbbbc) matchedaccddbbjjjb) 'Found match!' |
| Prompt: Write a python function to find number of solutions in quadratic equation. Assesments: assert Check_Solution(2,5,2) == 2 solutions, assert Check_Solution(1,1,1) == No solutions, assert Check_Solution(1,2,1) == 1 solutionPrompt: Write python function find solutions quadratic equationAssesments: assert Check_Solution(2,5,2),1,1)(1,2,1) solution |
| Prompt: Write a function to find the sum of first even and odd number of a given list. Assesments: assert sum_even_odd([1,3,5,7,4,1,6,8])==5, assert sum_even_odd([1,2,3,4,5,6,7,8,9,10])==3, assert sum_even_odd([1,5,7,9,10])==11Prompt: Write function find sum even odd listAssesments: assert sum_even_odd,3,5,7,4)==5,3,4,5,6,7,8,9,10,7,9,10])==11 |
| Prompt: Write a function to caluclate perimeter of a parallelogram. Assesments: assert parallelogram_perimeter(10,20)==400, assert parallelogram_perimeter(15,20)==600, assert parallelogram_perimeter(8,9)==144Prompt: Write function perimeter parallelogramAssesments: assert_perimeter(10,20)==400(15,20)==600(8,9)==144 |
| Prompt: Write a function to find numbers divisible by m and n from a list of numbers using lambda function. Assesments: assert div_of_nums([19, 65, 57, 39, 152, 639, 121, 44, 90, 190],2,4)==[ 152,44], assert div_of_nums([1, 2, 3, 5, 7, 8, 10],2,5)==[10], assert div_of_nums([10,15,14,13,18,12,20],10,5)==[10,20]Prompt: Write function find numbers divisible m n lambdaAssesments: assert div 65 57 39 152 121 44 90 190,2,4)== 152,44 2 3 5 7 8 10,15,14,18,20,5)== |
| Prompt: Write a python function to check whether all the bits are within a given range or not. Assesments: assert all_Bits_Set_In_The_Given_Range(10,2,1) == True , assert all_Bits_Set_In_The_Given_Range(5,2,4) == False, assert all_Bits_Set_In_The_Given_Range(22,2,3) == TruePrompt: Write python function check bits rangeAssesments: assert all_Bits_Set_In_Given_Range(10,2,1) True_Range(5,2,4) False_Range(22,2,3) True |
| Prompt: Write a python function to check whether the two given strings are isomorphic to each other or not. Assesments: assert is_Isomorphic(paper,title) == True, assert is_Isomorphic(ab,ba) == True, assert is_Isomorphic(ab,aa) == FalsePrompt: Write python function check two strings isomorphicAssesments: assert_Isomorphic(paper,title) == True(ab,ba)(ab,aa) False |
| Prompt: Write a function to add all the numbers in a list and divide it with the length of the list. Assesments: assert sum_num((8, 2, 3, 0, 7))==4.0, assert sum_num((-10,-20,-30))==-20.0, assert sum_num((19,15,18))==17.333333333333332Prompt: Write function add numbers list divide lengthAssesments: assert sum_num((8 2 3 0 7))==4.0(-10,-20,-30)==-20.0,15,18) |
| Prompt: Write a python function to check whether the given number is odd or not using bitwise operator. Assesments: assert is_odd(5) == True, assert is_odd(6) == False, assert is_odd(7) == True |
| Prompt: Write a function to substract the elements of the given nested tuples. Assesments: assert substract_elements(((1, 3), (4, 5), (2, 9), (1, 10)), ((6, 7), (3, 9), (1, 1), (7, 3))) == ((-5, -4), (1, -4), (1, 8), (-6, 7)), assert substract_elements(((13, 4), (14, 6), (13, 10), (12, 11)), ((19, 8), (14, 10), (12, 2), (18, 4))) == ((-6, -4), (0, -4), (1, 8), (-6, 7)), assert substract_elements(((19, 5), (18, 7), (19, 11), (17, 12)), ((12, 9), (17, 11), (13, 3), (19, 5))) == ((7, -4), (1, -4), (6, 8), (-2, 7))Prompt: Write function substract tuplesAssesments: assert substract, (4, (2, 9) (1, 10, 7) (3, (1, (7,, -4) (1, -4) (1,, (14, 11, 8) (18,, -4), -4) (1, 8), 5) (18, 7) (19, (17, 12, 9) (13, (19,, -4) (1, -4) (6, 8) (-2, 7) |
| Prompt: Write a function to reverse each list in a given list of lists. Assesments: assert reverse_list_lists([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]])==[[4, 3, 2, 1], [8, 7, 6, 5], [12, 11, 10, 9], [16, 15, 14, 13]], assert reverse_list_lists([[1,2],[2,3],[3,4]])==[[2,1],[3,2],[4,3]], assert reverse_list_lists([[10,20],[30,40]])==[[20,10],[40,30]]Prompt: Write function reverse listAssesments: assert reverse_list_lists 2 3 4 6 7 8 10 11 12 14 15[4 3 2 1 7 6 5 11 10 9 15 14 assert reverse_list_lists[2,1][3,2][4,3] reverse_list_lists[10,20][30,40]],10,30]] |
| Prompt: Write a python function to find the index of an extra element present in one sorted array. Assesments: assert find_Extra([1,2,3,4],[1,2,3],3) == 3, assert find_Extra([2,4,6,8,10],[2,4,6,8],4) == 4, assert find_Extra([1,3,5,7,9,11],[1,3,5,7,9],5) == 5Prompt: Write python function find index extra element arrayAssesments: assert find_Extra([1,2,3,4,3) == 3([2,4,6,8,4) 4([1,3,5,7,9,11,5) |
| Prompt: Write a python function to check whether the given two numbers have same number of digits or not. Assesments: assert same_Length(12,1) == False, assert same_Length(2,2) == True, assert same_Length(10,20) == TruePrompt: Write python function check numbers digitsAssesments: assert same_Length(12,1) False_Length(2,2) True_Length(10,20) True |
| Prompt: Write a function to remove multiple spaces in a string. Assesments: assert remove_spaces('python program')==('python program'), assert remove_spaces('python programming language')==('python programming language'), assert remove_spaces('python program')==('python program') |
| Prompt: Write a python function to get the last element of each sublist. Assesments: assert Extract([[1, 2, 3], [4, 5], [6, 7, 8, 9]]) == [3, 5, 9], assert Extract([['x', 'y', 'z'], ['m'], ['a', 'b'], ['u', 'v']]) == ['z', 'm', 'b', 'v'], assert Extract([[1, 2, 3], [4, 5]]) == [3, 5]Prompt: Write python function last element sublistAssesments: assert Extract, 2 3, 5, 7 8 [3, 5 9 assert Extract'x 'y 'z'm 'b'u 'v'z assert Extract[1, 2 3 [4, [3, 5] |
| Prompt: Write a function to convert the given string of float type into tuple. Assesments: assert float_to_tuple(1.2, 1.3, 2.3, 2.4, 6.5) == (1.2, 1.3, 2.3, 2.4, 6.5), assert float_to_tuple(2.3, 2.4, 5.6, 5.4, 8.9) == (2.3, 2.4, 5.6, 5.4, 8.9), assert float_to_tuple(0.3, 0.5, 7.8, 9.4) == (0.3, 0.5, 7.8, 9.4)Prompt: Write function convert float tupleAssesments: assert float_to_tuple(1.2, 1.3, 2.3, 2.4, 6.5)_tuple(2.3, 2.4, 5.6, 5.4, 8.9)_tuple(0.3, 0.5, 7.8, 9.4) 9.4) |
| Prompt: Write a function to find the maximum sum of subsequences of given array with no adjacent elements. Assesments: assert max_sum_subseq([1, 2, 9, 4, 5, 0, 4, 11, 6]) == 26, assert max_sum_subseq([1, 2, 9, 5, 6, 0, 5, 12, 7]) == 28, assert max_sum_subseq([1, 3, 10, 5, 6, 0, 6, 14, 21]) == 44Prompt: Write function find maximum sum subsequences array no adjacent elementsAssesments: assert max_sum_subseq( 2 9 4 11, 6 26, 2 9 5 12, 7 28, 3, 10 5 14 21 44 |
| Prompt: Write a function to sort a list in increasing order by the last element in each tuple from a given list of non-empty tuples. Assesments: assert sort_list_last([(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)])==[(2, 1), (1, 2), (2, 3), (4, 4), (2, 5)] , assert sort_list_last([(9,8), (4, 7), (3,5), (7,9), (1,2)])==[(1,2), (3,5), (4,7), (9,8), (7,9)] , assert sort_list_last([(20,50), (10,20), (40,40)])==[(10,20),(40,40),(20,50)]Prompt: Write function sort list last element non-empty tuplesAssesments: assert sort_list_last(, 5) (1, 2) (4, 4) (2, 3) (2, 1), 1), (4, 4) sort(9,8), (4, 7) (3,5), (7,9), (1,2) (7,9(20 (10,20) (40,40) |
| Prompt: Write a python function to check whether the word is present in a given sentence or not. Assesments: assert is_Word_Present(machine learning,machine) == True, assert is_Word_Present(easy,fun) == False, assert is_Word_Present(python language,code) == FalsePrompt: Write python function check word present sentenceAssesments: assert_Present(machine == Trueeasy,fun) Falsepython language,code) == False |
| Prompt: Write a function to extract specified number of elements from a given list, which follow each other continuously. Assesments: assert extract_elements([1, 1, 3, 4, 4, 5, 6, 7],2)==[1, 4], assert extract_elements([0, 1, 2, 3, 4, 4, 4, 4, 5, 7],4)==[4], assert extract_elements([0,0,0,0,0],5)==[0]Prompt: Write function extract elements listAssesments: assert extract_elements([1 3 4 4 5 6 7],2)==[1, 4] assert( 3 4 5 7],4)==[4] extract_elements(,5)==[0] |
| Prompt: Write a python function to check whether an array can be sorted or not by picking only the corner elements. Assesments: assert check([3,2,1,2,3,4],6) == True, assert check([2,1,4,5,1],5) == True, assert check([1,2,2,1,2,3],6) == TruePrompt: Write python function check array picking corner elementsAssesments: assert check([3,2,1,2,3,4],6)[2,1,4,5,1],5)[1,2,3] |
| Prompt: Write a function where a string will start with a specific number. Assesments: assert match_num('5-2345861')==True, assert match_num('6-2345861')==False, assert match_num('78910')==False |
| Prompt: Write a function to find the smallest multiple of the first n numbers. Assesments: assert smallest_multiple(13)==360360, assert smallest_multiple(2)==2, assert smallest_multiple(1)==1 |
| Prompt: Write a function to combine two dictionaries by adding values for common keys. Assesments: assert add_dict({'a': 100, 'b': 200, 'c':300},{'a': 300, 'b': 200, 'd':400})==({'b': 400, 'd': 400, 'a': 400, 'c': 300}) , assert add_dict({'a': 500, 'b': 700, 'c':900},{'a': 500, 'b': 600, 'd':900})==({'b': 1300, 'd': 900, 'a': 1000, 'c': 900}) , assert add_dict({'a':900,'b':900,'d':900},{'a':900,'b':900,'d':900})==({'b': 1800, 'd': 1800, 'a': 1800}) |
| Prompt: Write a python function to count the total unset bits from 1 to n. Assesments: assert count_Unset_Bits(2) == 1, assert count_Unset_Bits(5) == 4, assert count_Unset_Bits(14) == 17 |
| Prompt: Write a function to return true if the given number is even else return false. Assesments: assert even_num(13.5)==False, assert even_num(0)==True, assert even_num(-9)==False |
| Prompt: Write a python function to find the sum of squares of binomial co-efficients. Assesments: assert sum_of_square(4) == 70, assert sum_of_square(5) == 252, assert sum_of_square(2) == 6 |
| Prompt: Write a function to extract year, month and date from a url by using regex. Assesments: assert extract_date(https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-author/) == [('2016', '09', '02')], assert extract_date(https://www.indiatoday.in/movies/celebrities/story/wp/2020/11/03/odeof-sushant-singh-rajput-s-death-his-brother-in-law-shares-advice-for-fans-1749646/) == [('2020', '11', '03')], assert extract_date(https://economictimes.indiatimes.com/news/economy/2020/12/29/finance/pension-assets-under-pfrda-touch-rs-5-32-lakh-crore/articleshow/79736619.cms) == [('2020', '12', '29')] |
| Prompt: Write a function to print the first n lucky numbers. Assesments: assert lucky_num(10)==[1, 3, 7, 9, 13, 15, 21, 25, 31, 33] , assert lucky_num(5)==[1, 3, 7, 9, 13], assert lucky_num(8)==[1, 3, 7, 9, 13, 15, 21, 25]Prompt: Write function print lucky numbersAssesments: assert lucky_num(10 3 7 9 13, 15 21, 25 31, 33 3 7 13 3 15 25 |
| Prompt: Write a function to find the fixed point in the given array. Assesments: assert find_fixed_point([-10, -1, 0, 3, 10, 11, 30, 50, 100],9) == 3, assert find_fixed_point([1, 2, 3, 4, 5, 6, 7, 8],8) == -1, assert find_fixed_point([0, 2, 5, 8, 17],5) == 0Prompt: Write function find fixed point arrayAssesments: assert find_fixed_point( 11 50 100 == 3([1 2 7 8],8) -1([0 2 5 8 17],5) == |
| Prompt: Write a function to find the previous palindrome of a specified number. Assesments: assert previous_palindrome(99)==88, assert previous_palindrome(1221)==1111, assert previous_palindrome(120)==111 |
| Prompt: Write a function to validate a gregorian date. Assesments: assert check_date(11,11,2002)==True, assert check_date(13,11,2002)==False, assert check_date('11','11','2002')==TruePrompt: Write function validate gregorian dateAssesments: assert check_date(11,11,2002 assert check_date |
| Prompt: Write a function to compute maximum product of three numbers of a given array of integers using heap queue algorithm. Assesments: assert maximum_product( [12, 74, 9, 50, 61, 41])==225700, assert maximum_product([25, 35, 22, 85, 14, 65, 75, 25, 58])==414375, assert maximum_product([18, 14, 10, 9, 8, 7, 9, 3, 2, 4, 1])==2520Prompt: Write function compute three integers heap queue algorithmAssesments: assert maximum_product 74 9 50 61 41 35 22, 85 14 65 75 25 58 14 10 9 3 2 4 1 |
| Prompt: Write a function to find ln, m lobb number. Assesments: assert int(lobb_num(5, 3)) == 35, assert int(lobb_num(3, 2)) == 5, assert int(lobb_num(4, 2)) == 20Prompt: Write function find lobb numberAssesments: assert_num(5, 3) 35, 2) 5, 2) 20 |
| Prompt: Write a function to check for a number at the end of a string. Assesments: assert end_num('abcdef')==False, assert end_num('abcdef7')==True, assert end_num('abc')==False |
| Prompt: Write a python function to check whether the given string is made up of two alternating characters or not. Assesments: assert is_Two_Alter(abab) == True, assert is_Two_Alter(aaaa) == False, assert is_Two_Alter(xyz) == FalsePrompt: Write python function check string two alternating charactersAssesments: assert_Two_Alter(abab) == Trueaaaa) Falsexyz) False |
| Prompt: Write a function to rearrange positive and negative numbers in a given array using lambda function. Assesments: assert rearrange_numbs([-1, 2, -3, 5, 7, 8, 9, -10])==[2, 5, 7, 8, 9, -10, -3, -1], assert rearrange_numbs([10,15,14,13,-18,12,-20])==[10, 12, 13, 14, 15, -20, -18], assert rearrange_numbs([-20,20,-10,10,-30,30])==[10, 20, 30, -30, -20, -10]Prompt: Write function rearrange positive negative numbers array lambda functionAssesments: assert rearrange_numbs([-1 2 -3 5 7 8 9[2 5 7 8 9 -10 -3 -1]_numbs[10,15,14,13,-18,12,-20 -20[-20,-10,30 |
| Prompt: Write a function to find if there is a triplet in the array whose sum is equal to a given value. Assesments: assert find_triplet_array([1, 4, 45, 6, 10, 8], 6, 22) == (4, 10, 8), assert find_triplet_array([12, 3, 5, 2, 6, 9], 6, 24) == (12, 3, 9), assert find_triplet_array([1, 2, 3, 4, 5], 5, 9) == (1, 3, 5)Prompt: Write function find triplet array equal valueAssesments: assert find_triplet_array(, 4 10 8 22 (4, 10, 8) 3 5 6 9 24 3_array, 2 3 4 5 5, 9) (1, 3, 5) |
| Prompt: Write a function to find the sequences of one upper case letter followed by lower case letters. Assesments: assert text_uppercase_lowercase(AaBbGg)==('Found a match!'), assert text_uppercase_lowercase(aA)==('Not matched!'), assert text_uppercase_lowercase(PYTHON)==('Not matched!')Prompt: Write function find sequences upper case letter lower case lettersAssesments: assert text_uppercase_lowercaseAaBbGg)=='Found match matched matched' |
| Prompt: Write a function to count coin change. Assesments: assert coin_change([1, 2, 3],3,4)==4, assert coin_change([4,5,6,7,8,9],6,9)==2, assert coin_change([4,5,6,7,8,9],6,4)==1Prompt: Write function count coinAssesments: assert 2 3,3,4)==4,6,7,8,9,6,9)==2,6,7 |
| Prompt: Write a python function to multiply all items in the list. Assesments: assert multiply_list([1,-2,3]) == -6, assert multiply_list([1,2,3,4]) == 24, assert multiply_list([3,1,2,3]) == 18Prompt: Write python function multiply items listAssesments: assert[1-2,3 -6,3,4 24[3,1,2,3] 18 |
| Prompt: Write a function to remove all tuples with all none values in the given tuple list. Assesments: assert remove_tuple([(None, 2), (None, None), (3, 4), (12, 3), (None, )] ) == '[(None, 2), (3, 4), (12, 3)]', assert remove_tuple([(None, None), (None, None), (3, 6), (17, 3), (None,1 )] ) == '[(3, 6), (17, 3), (None, 1)]', assert remove_tuple([(1, 2), (2, None), (3, None), (24, 3), (None, None )] ) == '[(1, 2), (2, None), (3, None), (24, 3)]'Prompt: Write function remove tuples none values listAssesments: assert remove_tuple([(None, 2) (3, 4) (12, 3)(None (3, 4) (12, 3)_tuple((None (3, 6) (17, 3), (17 remove_tuple([(1, 2) (2, None), (3, None), (24, 3) (None None ), (3 (24, 3) |
| Prompt: Write a function to perform chunking of tuples each of size n. Assesments: assert chunk_tuples((10, 4, 5, 6, 7, 6, 8, 3, 4), 3) == [(10, 4, 5), (6, 7, 6), (8, 3, 4)], assert chunk_tuples((1, 2, 3, 4, 5, 6, 7, 8, 9), 2) == [(1, 2), (3, 4), (5, 6), (7, 8), (9,)], assert chunk_tuples((11, 14, 16, 17, 19, 21, 22, 25), 4) == [(11, 14, 16, 17), (19, 21, 22, 25)]Prompt: Write function chunking tuplesAssesments: assert chunk_tuples((10 4 5 6 7 8 3 4) 3) 4 5) (6 7 3 4)((1 2 3 4 5 6 7 8 9) 4) (5 6) (7 8)(11 14 16 17, 19, 21, 4) (19 25 |
| Prompt: Write a function to find a pair with the highest product from a given array of integers. Assesments: assert max_product([1, 2, 3, 4, 7, 0, 8, 4])==(7, 8), assert max_product([0, -1, -2, -4, 5, 0, -6])==(-4, -6), assert max_product([1, 3, 5, 6, 8, 9])==(8,9)Prompt: Write function find pair highest product integersAssesments: assert max_product( 2 3 4(7, 8) -1 -2 -4 -6(-4 -6) 3 5 6 8 9(8,9 |
| Prompt: Write a function to find the length of the shortest string that has both str1 and str2 as subsequences. Assesments: assert super_seq(AGGTAB, GXTXAYB, 6, 7) == 9, assert super_seq(feek, eke, 4, 3) == 5, assert super_seq(PARRT, RTA, 5, 3) == 6Prompt: Write function length shortest string str1 str2 subsequencesAssesments: assert super_seq( GXTXAYB, 6, 7) 9_seq( 4, 3) 5 5 6 |
| Prompt: Write a function to find maximum of two numbers. Assesments: assert max_of_two(10,20)==20, assert max_of_two(19,15)==19, assert max_of_two(-10,-20)==-10Prompt: Write function find two numbersAssesments: assert max,20)==20,15)==19(-10,-20 |
| Prompt: Write a python function to calculate the product of all the numbers of a given tuple. Assesments: assert mutiple_tuple((4, 3, 2, 2, -1, 18)) == -864, assert mutiple_tuple((1,2,3)) == 6, assert mutiple_tuple((-2,-4,-6)) == -48Prompt: Write python function calculate numbers tupleAssesments: assert mutiple_tuple((4 3 2 18 == -864((1,2,3 6((-2,-4,-6 -48 |
| Prompt: Write a function to find n-th rencontres number. Assesments: assert rencontres_number(7, 2) == 924, assert rencontres_number(3, 0) == 2, assert rencontres_number(3, 1) == 3Prompt: Write function find-th rencontresAssesments: assert_number(7, 2) 924, 2, 1) 3 |
| Prompt: Write a function to calculate the height of the given binary tree. Assesments: assert (max_height(root)) == 3, assert (max_height(root1)) == 5 , assert (max_height(root2)) == 4 |
| Prompt: Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format. Assesments: assert change_date_format('2026-01-02')=='02-01-2026', assert change_date_format('2021-01-04')=='04-01-2021', assert change_date_format('2030-06-06')=='06-06-2030' |
| Prompt: Write a function to count repeated items of a tuple. Assesments: assert count_tuplex((2, 4, 5, 6, 2, 3, 4, 4, 7),4)==3, assert count_tuplex((2, 4, 5, 6, 2, 3, 4, 4, 7),2)==2, assert count_tuplex((2, 4, 7, 7, 7, 3, 4, 4, 7),7)==4Prompt: Write function count items tupleAssesments: assert count_tuplex((2 4 5 6 2 3 4 4 7),4)==3 4 7) 7 3 4 4 7),7)==4 |
| Prompt: Write a function that matches a string that has an a followed by zero or more b's by using regex. Assesments: assert text_match(""msb"") == 'Not matched!', assert text_match(""a0c"") == 'Found a match!', assert text_match(""abbc"") == 'Found a match!'",67,0.033,38,1.763157894736842,"Prompt: Write function matches string a followed zero b's regexAssesments: assert text_match(msb) matcheda0c) 'Found match""abbc"") 'Found match |
| Prompt: Write a function to calculate the sum of series 1³+2³+3³+….+n³. Assesments: assert sum_series(7)==784, assert sum_series(5)==225, assert sum_series(15)==14400 |
| Prompt: Write a function to remove duplicate words from a given list of strings. Assesments: assert remove_duplic_list([Python, Exercises, Practice, Solution, Exercises])==['Python', 'Exercises', 'Practice', 'Solution'], assert remove_duplic_list([Python, Exercises, Practice, Solution, Exercises,Java])==['Python', 'Exercises', 'Practice', 'Solution', 'Java'], assert remove_duplic_list([Python, Exercises, Practice, Solution, Exercises,C++,C,C++])==['Python', 'Exercises', 'Practice', 'Solution','C++','C']Prompt: Write function remove duplicate words list stringsAssesments: assert remove_duplic_list([Python, Exercises, Practice, Solution,])=='Python' 'Solution remove_duplic_list(""Python"", ""Solution"",""Java""])=='Python remove_duplic_list([Python, Exercises, Solution,C++,C,])==['Python'C++''] |
| Prompt: Write a function to convert camel case string to snake case string by using regex. Assesments: assert camel_to_snake('GoogleAssistant') == 'google_assistant', assert camel_to_snake('ChromeCast') == 'chrome_cast', assert camel_to_snake('QuadCore') == 'quad_core' |
| Prompt: Write a function to find the nth delannoy number. Assesments: assert dealnnoy_num(3, 4) == 129, assert dealnnoy_num(3, 3) == 63, assert dealnnoy_num(4, 5) == 681Prompt: Write function find nth delannoy numberAssesments: assert_num(3, 4) 129 63, 5) 681 |
| Prompt: Write a function to calculate the sum of series 1²+2²+3²+….+n². Assesments: assert series_sum(6)==91, assert series_sum(7)==140, assert series_sum(12)==650 |
| Prompt: Write a function to re-arrange the given tuples based on the given ordered list. Assesments: assert re_arrange_tuples([(4, 3), (1, 9), (2, 10), (3, 2)], [1, 4, 2, 3]) == [(1, 9), (4, 3), (2, 10), (3, 2)], assert re_arrange_tuples([(5, 4), (2, 10), (3, 11), (4, 3)], [3, 4, 2, 3]) == [(3, 11), (4, 3), (2, 10), (3, 11)], assert re_arrange_tuples([(6, 3), (3, 8), (5, 7), (2, 4)], [2, 5, 3, 6]) == [(2, 4), (5, 7), (3, 8), (6, 3)]Prompt: Write function re-arrange tuples listAssesments: assert re_arrange_tuples, 3) (1, 9) (2, (3, 2) [1, 4, 2, 3,, 4) (2, (3, (4, 3) [3, 4, 2, 3, 3) (3, 8) (5, 7) (2, 4), 5, 3, 6, 4) (5, (3, (6, |
| Prompt: Write a function to count the most common character in a given string. Assesments: assert max_char(hello world)==('l'), assert max_char(hello )==('l'), assert max_char(python pr)==('p')Prompt: Write function count common character stringAssesments: assert max_charhello world)==('l'l pr)=='p') |
| Prompt: Write a function to find three closest elements from three sorted arrays. Assesments: assert find_closet([1, 4, 10],[2, 15, 20],[10, 12],3,3,2) == (10, 15, 10), assert find_closet([20, 24, 100],[2, 19, 22, 79, 800],[10, 12, 23, 24, 119],3,5,5) == (24, 22, 23), assert find_closet([2, 5, 11],[3, 16, 21],[11, 13],3,3,2) == (11, 16, 11)Prompt: Write function find three elements arraysAssesments: assert find_closet, 4 10 15 20 12,2) (10 15, 24 100 19, 22, 800 12 23, 24 119 (24, 5 11, 16, 21 13,2) (11 16 11 |
| Prompt: Write a function to sort a list of dictionaries using lambda function. Assesments: assert sorted_models([{'make':'Nokia', 'model':216, 'color':'Black'}, {'make':'Mi Max', 'model':2, 'color':'Gold'}, {'make':'Samsung', 'model': 7, 'color':'Blue'}])==[{'make': 'Nokia', 'model': 216, 'color': 'Black'}, {'make': 'Samsung', 'model': 7, 'color': 'Blue'}, {'make': 'Mi Max', 'model': 2, 'color': 'Gold'}], assert sorted_models([{'make':'Vivo', 'model':20,'color':'Blue'},{'make': 'oppo','model':17,'color':'Gold'},{'make':'Apple','model':11,'color':'red'}])==([{'make':'Vivo', 'model':20,'color':'Blue'},{'make': 'oppo','model':17,'color':'Gold'},{'make':'Apple','model':11,'color':'red'}]), assert sorted_models([{'make':'micromax','model':40,'color':'grey'},{'make':'poco','model':60,'color':'blue'}])==([{'make':'poco','model':60,'color':'blue'},{'make':'micromax','model':40,'color':'grey'}]) |
| Prompt: Write a function to sort the given array by using heap sort. Assesments: assert heap_sort([12, 2, 4, 5, 2, 3]) == [2, 2, 3, 4, 5, 12], assert heap_sort([32, 14, 5, 6, 7, 19]) == [5, 6, 7, 14, 19, 32], assert heap_sort([21, 15, 29, 78, 65]) == [15, 21, 29, 65, 78]Prompt: Write function sort array heap sortAssesments: assert heap_sort([12 2 4 5 2 3 heap_sort([32 14 5 6 7 19 heap_sort([21, 15 29, 78 65 21, 29, 65 78 |
| Prompt: Write a function to count the elements in a list until an element is a tuple. Assesments: assert count_elim([10,20,30,(10,20),40])==3, assert count_elim([10,(20,30),(10,20),40])==1, assert count_elim([(10,(20,30,(10,20),40))])==0Prompt: Write function count elements list until element tupleAssesments: assert count_elim([10,20,30,(10,40])==3_elim([10,30),40])==1()==0 |
| Prompt: Write a function to check if any list element is present in the given list. Assesments: assert check_element((4, 5, 7, 9, 3), [6, 7, 10, 11]) == True, assert check_element((1, 2, 3, 4), [4, 6, 7, 8, 9]) == True, assert check_element((3, 2, 1, 4, 5), [9, 8, 7, 6]) == False |
| Prompt: Write a function to combine two given sorted lists using heapq module. Assesments: assert combine_lists([1, 3, 5, 7, 9, 11],[0, 2, 4, 6, 8, 10])==[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], assert combine_lists([1, 3, 5, 6, 8, 9], [2, 5, 7, 11])==[1,2,3,5,5,6,7,8,9,11], assert combine_lists([1,3,7],[2,4,6])==[1,2,3,4,6,7]Prompt: Write function combine lists heapq moduleAssesments: assert combine_lists 3 5 7 9 11 4 6 8 10 11 combine 3 5 6 8 9 7 11[1,2,3,5,5,6,7,8,9,11,3,7,4,6[1,2,3,4,6,7 |
| Prompt: Write a function to separate and print the numbers and their position of a given string. Assesments: assert num_position(there are 70 flats in this apartment)==10, assert num_position(every adult have 32 teeth)==17, assert num_position(isha has 79 chocolates in her bag)==9Prompt: Write function separate print numbers position stringAssesments: assert num 70 flats apartment)==10 adult 32 teeth)==17 79 chocolates bag)==9 |
| Prompt: Write a function to convert the given tuples into set. Assesments: assert tuple_to_set(('x', 'y', 'z') ) == {'y', 'x', 'z'}, assert tuple_to_set(('a', 'b', 'c') ) == {'c', 'a', 'b'}, assert tuple_to_set(('z', 'd', 'e') ) == {'d', 'e', 'z'} |
| Prompt: Write a function to find the most common elements and their counts of a specified text. Assesments: assert most_common_elem('lkseropewdssafsdfafkpwe',3)==[('s', 4), ('e', 3), ('f', 3)] , assert most_common_elem('lkseropewdssafsdfafkpwe',2)==[('s', 4), ('e', 3)], assert most_common_elem('lkseropewdssafsdfafkpwe',7)==[('s', 4), ('e', 3), ('f', 3), ('k', 2), ('p', 2), ('w', 2), ('d', 2)]Prompt: Write function find common elements counts textAssesments: assert most_common_elem(('s' 4) ('e''f' 3)('s' 4) ('e' 3)_elem(('s' 4) ('e' 3)'f' 3) ('k' 2) ('p', 2) ('w''d', 2) |
| Prompt: Write a python function to find the length of the shortest word. Assesments: assert len_log([win,lose,great]) == 3, assert len_log([a,ab,abc]) == 1, assert len_log([12,12,1234]) == 2Prompt: Write python function find length shortest wordAssesments: assert len_log( == 3 assert([ 1([12, == 2 |
| Prompt: Write a function to get an item of a tuple. Assesments: assert get_item((w, 3, r, e, s, o, u, r, c, e),3)==('e'), assert get_item((w, 3, r, e, s, o, u, r, c, e),-4)==('u'), assert get_item((w, 3, r, e, s, o, u, r, c, e),-3)==('r')Prompt: Write function get item tupleAssesments: assert get_item((w, 3 r, e),3)==('e assert get_item((""w"", 3 ""e""),-4)==('u assert get_item((w, 3 r, e),-3)==('r') |
| Prompt: Write a function to sort the given tuple list basis the total digits in tuple. Assesments: assert sort_list([(3, 4, 6, 723), (1, 2), (12345,), (134, 234, 34)] ) == '[(1, 2), (12345,), (3, 4, 6, 723), (134, 234, 34)]', assert sort_list([(3, 4, 8), (1, 2), (1234335,), (1345, 234, 334)] ) == '[(1, 2), (3, 4, 8), (1234335,), (1345, 234, 334)]', assert sort_list([(34, 4, 61, 723), (1, 2), (145,), (134, 23)] ) == '[(1, 2), (145,), (134, 23), (34, 4, 61, 723)]'Prompt: Write function sort tuple list digitsAssesments: assert sort_list(, 4, 6, 723) (1, 2) (12345 (134, 234, 34) (134 234, 4, 8) (1, 2) (1234335 (1345, 234, 334) (1345 234, 334)((34, 4, 61, 723) (1, 2) (145 (134, 23) 4 61 723) |
| Prompt: Write a function to display sign of the chinese zodiac for given year. Assesments: assert chinese_zodiac(1997)==('Ox'), assert chinese_zodiac(1998)==('Tiger'), assert chinese_zodiac(1994)==('Dog') |
| Prompt: Write a function to find the maximum of similar indices in two lists of tuples. Assesments: assert max_similar_indices([(2, 4), (6, 7), (5, 1)],[(5, 4), (8, 10), (8, 14)]) == [(5, 4), (8, 10), (8, 14)], assert max_similar_indices([(3, 5), (7, 8), (6, 2)],[(6, 5), (9, 11), (9, 15)]) == [(6, 5), (9, 11), (9, 15)], assert max_similar_indices([(4, 6), (8, 9), (7, 3)],[(7, 6), (10, 12), (10, 16)]) == [(7, 6), (10, 12), (10, 16)]Prompt: Write function similar indices two lists tuplesAssesments: assert max_similar_indices, 4) (6, 7) (5, 1), 4) (8, 10), (8 14)_indices, 5) (7, 8) (6, 2), 5) (9, (9, 15)_indices, 6) (8, 9) (7, 3)(7, 6) (10, 12),, 16) |
| Prompt: Write a function to compute the value of ncr mod p. Assesments: assert nCr_mod_p(10, 2, 13) == 6, assert nCr_mod_p(11, 3, 14) == 11, assert nCr_mod_p(18, 14, 19) == 1 |
| Prompt: Write a python function to find the minimun number of subsets with distinct elements. Assesments: assert subset([1, 2, 3, 4],4) == 1, assert subset([5, 6, 9, 3, 4, 3, 4],7) == 2, assert subset([1, 2, 3 ],3) == 1Prompt: Write python function find subsets elementsAssesments: assert subset([1 2 3 4],4) == 1[5 6 9,7) 2[1 3,3) |
| Prompt: Write a function that gives profit amount if the given amount has profit else return none. Assesments: assert profit_amount(1500,1200)==300, assert profit_amount(100,200)==None, assert profit_amount(2000,5000)==NonePrompt: Write function profit return noneAssesments: assert profit(1500,1200)==300(100,200)==None(2000,5000)==None |
| Prompt: Write a function to find out, if the given number is abundant. Assesments: assert is_abundant(12)==True, assert is_abundant(13)==False, assert is_abundant(9)==False |
| Prompt: Write a function to split the given string at uppercase letters by using regex. Assesments: assert split_list(LearnToBuildAnythingWithGoogle) == ['Learn', 'To', 'Build', 'Anything', 'With', 'Google'], assert split_list(ApmlifyingTheBlack+DeveloperCommunity) == ['Apmlifying', 'The', 'Black+', 'Developer', 'Community'], assert split_list(UpdateInTheGoEcoSystem) == ['Update', 'In', 'The', 'Go', 'Eco', 'System']Prompt: Write function split string uppercase letters regexAssesments: assert split_list(LearnToBuildAnythingWithGoogle)'Learn 'Google' split_list(""ApmlifyingTheBlack+DeveloperCommunity"") 'Black+ 'Developer 'Community split_list(UpdateInTheGoEcoSystem)'Update 'Go 'Eco 'System'",0.0,0.16285073373685718 |
| "Prompt: Write a python function to get the position of rightmost set bit. Assesments: assert get_First_Set_Bit_Pos(12) == 3, assert get_First_Set_Bit_Pos(18) == 2, assert get_First_Set_Bit_Pos(16) == 5",61,0.033,33,1.8484848484848484,Prompt: Write python function position rightmost bitAssesments: assert_First_Set_Bit_Pos(12) == 3) 2(16) 5,0.0,0.30742352152931485 |
| "Prompt: Write a function to convert an integer into a roman numeral. Assesments: assert int_to_roman(1)==(""I""), assert int_to_roman(50)==(""L""), assert int_to_roman(4)==(""IV"")",51,0.033,23,2.217391304347826,"Prompt: Write function convert integer roman numeralAssesments: assert int""I""),(50""L""),""IV"")",0.0,0.60901203470473 |
| "Prompt: Write a python function to find the average of a list. Assesments: assert Average([15, 9, 55, 41, 35, 20, 62, 49]) == 35.75, assert Average([4, 5, 1, 2, 9, 7, 10, 8]) == 5.75, assert Average([1,2,3]) == 2",94,0.033,50,1.88,"Prompt: Write python function average listAssesments: assert Average 9 55 41 20 62 49 35.75 5 9 10 8 5.75[1,2,3] 2",0.0,0.33318779736915743 |
| "Prompt: Write a function to solve tiling problem. Assesments: assert get_noOfways(4)==3, assert get_noOfways(3)==2, assert get_noOfways(5)==5",44,0.032,20,2.2,Prompt: Write function solve tiling problemAssesments: assert_noOfways(4)==3,0.0,0.5947942905121748 |
| "Prompt: Write a function to convert a roman numeral to an integer. Assesments: assert roman_to_int('MMMCMLXXXVI')==3986, assert roman_to_int('MMMM')==4000, assert roman_to_int('C')==100",53,0.033,25,2.12,Prompt: Write function convert roman numeral integerAssesments: assert roman'MMMCMLXXXVI)==3986'C)==100,0.0,0.5293926672264204 |
| "Prompt: Write a python function to find the sum of all even natural numbers within the range l and r. Assesments: assert sum_Even(2,5) == 6, assert sum_Even(3,8) == 18, assert sum_Even(4,6) == 10",64,0.033,35,1.8285714285714285,"Prompt: Write python function find even numbers l rAssesments: assert sum(2,5) 6,8) 18(4,6) 10",0.0,0.2911438966854583 |
| "Prompt: Write a function to calculate the discriminant value. Assesments: assert discriminant_value(4,8,2)==(""Two solutions"",32), assert discriminant_value(5,7,9)==(""no real solution"",-131), assert discriminant_value(0,0,9)==(""one solution"",0)",68,0.033,37,1.837837837837838,"Prompt: Write function calculate discriminant valueAssesments: assert_value(4,8 solutions"",32),7,9(0,0,9""one solution"",0)",0.0,0.29871937428612494 |
| "Prompt: Write a python function to check whether the length of the word is even or not. Assesments: assert word_len(""program"") == False, assert word_len(""solution"") == True, assert word_len(""data"") == True",49,0.033,28,1.75,"Prompt: Write python function check length word evenAssesments: assert word_len(""program"") False""solution"") True""data"") True",0.0,0.22691015952980684 |
| "Prompt: Write a function to convert camel case string to snake case string. Assesments: assert camel_to_snake('PythonProgram')==('python_program'), assert camel_to_snake('pythonLanguage')==('python_language'), assert camel_to_snake('ProgrammingLanguage')==('programming_language')",62,0.033,32,1.9375,Prompt: Write function convert camel snakeAssesments: assert camel_to_snake('PythonProgram_program camel_to_snake('pythonLanguage_language('ProgrammingLanguage_language,0.0,0.38019521410579343 |
| ,121,0.033,62,1.9516129032258065,,0.0,0.39173279885882467 |
| ,52,0.033,28,1.8571428571428572,,0.0,0.3145016192875135 |
| ,62,0.033,37,1.6756756756756757,,0.0,0.1661485162744608 |
| ,200,0.034,111,1.8018018018018018,,0.0,0.26925918361686624 |
| ,49,0.033,27,1.8148148148148149,,0.0,0.27989758580298746 |
| ,86,0.033,46,1.8695652173913044,,0.0,0.32465715085362445 |
| ,104,0.033,53,1.9622641509433962,,0.0,0.40044040999318786 |
| ,61,0.033,28,2.1785714285714284,,0.0,0.5772759985606332 |
| ,104,0.034,63,1.6507936507936507,,0.0,0.1458069560504488 |
|
|