mo22zy's picture
download
raw
14.7 kB
{"task_id": 338, "text": "Write a python function to count the number of substrings with same first and last characters.", "test_list": ["assert count_Substring_With_Equal_Ends('aba') == 4", "assert count_Substring_With_Equal_Ends('abcab') == 7", "assert count_Substring_With_Equal_Ends('abc') == 3"]}
{"task_id": 68, "text": "Write a python function to check whether the given array is monotonic or not.", "test_list": ["assert is_Monotonic([6, 5, 4, 4]) == True", "assert is_Monotonic([1, 2, 2, 3]) == True", "assert is_Monotonic([1, 3, 2]) == False"]}
{"task_id": 23, "text": "Write a python function to find the maximum sum of elements of list in a list of lists.", "test_list": ["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]]) == 19"]}
{"task_id": 390, "text": "Write a function to insert a given string at the beginning of all items in a list.", "test_list": ["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']"]}
{"task_id": 151, "text": "Write a python function to check whether the given number is co-prime or not.", "test_list": ["assert is_coprime(17,13) == True", "assert is_coprime(15,21) == False", "assert is_coprime(25,45) == False"]}
{"task_id": 136, "text": "Write a function to calculate electricity bill.", "test_list": ["assert cal_electbill(75)==246.25", "assert cal_electbill(265)==1442.75", "assert cal_electbill(100)==327.5"]}
{"task_id": 125, "text": "Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.", "test_list": ["assert find_length(\"11000010001\", 11) == 6", "assert find_length(\"10111\", 5) == 1", "assert find_length(\"11011101100101\", 14) == 2 "]}
{"task_id": 82, "text": "Write a function to find the volume of a sphere.", "test_list": ["assert volume_sphere(10)==4188.790204786391", "assert volume_sphere(25)==65449.84694978735", "assert volume_sphere(20)==33510.32163829113"]}
{"task_id": 388, "text": "Write a python function to find the highest power of 2 that is less than or equal to n.", "test_list": ["assert highest_Power_of_2(10) == 8", "assert highest_Power_of_2(19) == 16", "assert highest_Power_of_2(32) == 32"]}
{"task_id": 63, "text": "Write a function to find the maximum difference between available pairs in the given tuple list.", "test_list": ["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"]}
{"task_id": 357, "text": "Write a function to find the maximum element of all the given tuple records.", "test_list": ["assert find_max([(2, 4), (6, 7), (5, 1), (6, 10), (8, 7)]) == 10", "assert find_max([(3, 5), (7, 8), (6, 2), (7, 11), (9, 8)]) == 11", "assert find_max([(4, 6), (8, 9), (7, 3), (8, 12), (10, 9)]) == 12"]}
{"task_id": 467, "text": "Write a python function to convert decimal number to octal number.", "test_list": ["assert decimal_to_Octal(10) == 12", "assert decimal_to_Octal(2) == 2", "assert decimal_to_Octal(33) == 41"]}
{"task_id": 290, "text": "Write a function to find the list of lists with maximum length.", "test_list": ["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])"]}
{"task_id": 55, "text": "Write a function to find t-nth term of geometric series.", "test_list": ["assert tn_gp(1,5,2)==16", "assert tn_gp(1,5,4)==256", "assert tn_gp(2,6,3)==486"]}
{"task_id": 313, "text": "Write a python function to print positive numbers in a list.", "test_list": ["assert pos_nos([-1,-2,1,2]) == 1,2", "assert pos_nos([3,4,-5]) == 3,4", "assert pos_nos([-2,-3,1]) == 1"]}
{"task_id": 227, "text": "Write a function to find minimum of three numbers.", "test_list": ["assert min_of_three(10,20,0)==0", "assert min_of_three(19,15,18)==15", "assert min_of_three(-10,-20,-30)==-30"]}
{"task_id": 27, "text": "Write a python function to remove all digits from a list of strings.", "test_list": ["assert remove(['4words', '3letters', '4digits']) == ['words', 'letters', 'digits']", "assert remove(['28Jan','12Jan','11Jan']) == ['Jan','Jan','Jan']", "assert remove(['wonder1','wonder2','wonder3']) == ['wonder','wonder','wonder']"]}
{"task_id": 26, "text": "Write a function to check if the given tuple list has all k elements.", "test_list": ["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) == False"]}
{"task_id": 58, "text": "Write a python function to check whether the given two integers have opposite sign or not.", "test_list": ["assert opposite_Signs(1,-2) == True", "assert opposite_Signs(3,2) == False", "assert opposite_Signs(-10,-10) == False"]}
{"task_id": 122, "text": "Write a function to find n’th smart number.", "test_list": ["assert smartNumber(1) == 30", "assert smartNumber(50) == 273", "assert smartNumber(1000) == 2664"]}
{"task_id": 130, "text": "Write a function to find the item with maximum frequency in a given list.", "test_list": ["assert max_occurrences([2,3,8,4,7,9,8,2,6,5,1,6,1,2,3,2,4,6,9,1,2])==(2, 5)", "assert max_occurrences([2,3,8,4,7,9,8,7,9,15,14,10,12,13,16,16,18])==(8, 2)", "assert max_occurrences([10,20,20,30,40,90,80,50,30,20,50,10])==(20, 3)"]}
{"task_id": 269, "text": "Write a function to find the ascii value of a character.", "test_list": ["assert ascii_value('A')==65", "assert ascii_value('R')==82", "assert ascii_value('S')==83"]}
{"task_id": 319, "text": "Write a function to find all five characters long word in the given string by using regex.", "test_list": ["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']"]}
{"task_id": 24, "text": "Write a function to convert the given binary number to its decimal equivalent.", "test_list": ["assert binary_to_decimal(100) == 4", "assert binary_to_decimal(1011) == 11", "assert binary_to_decimal(1101101) == 109"]}
{"task_id": 298, "text": "Write a function to find the nested list elements which are present in another list.", "test_list": ["assert intersection_nested_lists( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],[[12, 18, 23, 25, 45], [7, 11, 19, 24, 28], [1, 5, 8, 18, 15, 16]])==[[12], [7, 11], [1, 5, 8]]", "assert intersection_nested_lists([[2, 3, 1], [4, 5], [6, 8]], [[4, 5], [6, 8]])==[[], []]", "assert intersection_nested_lists(['john','amal','joel','george'],[['john'],['jack','john','mary'],['howard','john'],['jude']])==[['john'], ['john'], ['john'], []]"]}
{"task_id": 112, "text": "Write a python function to find the perimeter of a cylinder.", "test_list": ["assert perimeter(2,4) == 12", "assert perimeter(1,2) == 6", "assert perimeter(3,1) == 8"]}
{"task_id": 377, "text": "Write a python function to remove all occurrences of a character in a given string.", "test_list": ["assert remove_Char(\"aba\",'a') == \"b\"", "assert remove_Char(\"toggle\",'g') == \"tole\"", "assert remove_Char(\"aabbc\",'b') == \"aac\""]}
{"task_id": 343, "text": "Write a function to calculate the number of digits and letters in a string.", "test_list": ["assert dig_let(\"python\")==(6,0)", "assert dig_let(\"program\")==(7,0)", "assert dig_let(\"python3.0\")==(6,2)"]}
{"task_id": 370, "text": "Write a function to sort a tuple by its float element.", "test_list": ["assert float_sort([('item1', '12.20'), ('item2', '15.10'), ('item3', '24.5')])==[('item3', '24.5'), ('item2', '15.10'), ('item1', '12.20')] ", "assert float_sort([('item1', '15'), ('item2', '10'), ('item3', '20')])==[('item3', '20'), ('item1', '15'), ('item2', '10')] ", "assert float_sort([('item1', '5'), ('item2', '10'), ('item3', '14')])==[('item3', '14'), ('item2', '10'), ('item1', '5')] "]}
{"task_id": 225, "text": "Write a python function to find the minimum element in a sorted and rotated array.", "test_list": ["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"]}
{"task_id": 123, "text": "Write a function to sum all amicable numbers from 1 to a specified number.", "test_list": ["assert amicable_numbers_sum(999)==504", "assert amicable_numbers_sum(9999)==31626", "assert amicable_numbers_sum(99)==0"]}
{"task_id": 240, "text": "Write a function to replace the last element of the list with another list.", "test_list": ["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\"]"]}
{"task_id": 312, "text": "Write a function to find the volume of a cone.", "test_list": ["assert volume_cone(5,12)==314.15926535897927", "assert volume_cone(10,15)==1570.7963267948965", "assert volume_cone(19,17)==6426.651371693521"]}
{"task_id": 153, "text": "Write a function to find the vertex of a parabola.", "test_list": ["assert parabola_vertex(5,3,2)==(-0.3, 1.55)", "assert parabola_vertex(9,8,4)==(-0.4444444444444444, 2.2222222222222223)", "assert parabola_vertex(2,4,6)==(-1.0, 4.0)"]}
{"task_id": 425, "text": "Write a function to count the number of sublists containing a particular element.", "test_list": ["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"]}
{"task_id": 456, "text": "Write a function to reverse strings in a given list of string values.", "test_list": ["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']"]}
{"task_id": 14, "text": "Write a python function to find the volume of a triangular prism.", "test_list": ["assert find_Volume(10,8,6) == 240", "assert find_Volume(3,2,2) == 6", "assert find_Volume(1,2,1) == 1"]}
{"task_id": 399, "text": "Write a function to perform the mathematical bitwise xor operation across the given tuples.", "test_list": ["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)"]}
{"task_id": 423, "text": "Write a function to solve gold mine problem.", "test_list": ["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"]}
{"task_id": 92, "text": "Write a function to check whether the given number is undulating or not.", "test_list": ["assert is_undulating(\"1212121\") == True", "assert is_undulating(\"1991\") == False", "assert is_undulating(\"121\") == True"]}
{"task_id": 368, "text": "Write a function to repeat the given tuple n times.", "test_list": ["assert repeat_tuples((1, 3), 4) == ((1, 3), (1, 3), (1, 3), (1, 3))", "assert repeat_tuples((1, 2), 3) == ((1, 2), (1, 2), (1, 2))", "assert repeat_tuples((3, 4), 5) == ((3, 4), (3, 4), (3, 4), (3, 4), (3, 4))"]}
{"task_id": 185, "text": "Write a function to find the focus of a parabola.", "test_list": ["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)"]}
{"task_id": 90, "text": "Write a python function to find the length of the longest word.", "test_list": ["assert len_log([\"python\",\"PHP\",\"bigdata\"]) == 7", "assert len_log([\"a\",\"ab\",\"abc\"]) == 3", "assert len_log([\"small\",\"big\",\"tall\"]) == 5"]}
{"task_id": 121, "text": "Write a function to find the triplet with sum of the given array", "test_list": ["assert check_triplet([2, 7, 4, 0, 9, 5, 1, 3], 8, 6, 0) == True", "assert check_triplet([1, 4, 5, 6, 7, 8, 5, 9], 8, 6, 0) == False", "assert check_triplet([10, 4, 2, 3, 5], 5, 15, 0) == True"]}
{"task_id": 501, "text": "Write a python function to find common divisor between two numbers in a given pair.", "test_list": ["assert num_comm_div(2,4) == 2", "assert num_comm_div(2,8) == 2", "assert num_comm_div(12,24) == 6"]}
{"task_id": 401, "text": "Write a function to perform index wise addition of tuple elements in the given two nested tuples.", "test_list": ["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))"]}
{"task_id": 183, "text": "Write a function to count all the distinct pairs having a difference of k in any array.", "test_list": ["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) == 3"]}
{"task_id": 205, "text": "Write a function to find the inversions of tuple elements in the given tuple list.", "test_list": ["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)"]}
{"task_id": 60, "text": "Write a function to find the maximum length of the subsequence with difference between adjacent elements for the given array.", "test_list": ["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"]}
{"task_id": 194, "text": "Write a python function to convert octal number to decimal number.", "test_list": ["assert octal_To_Decimal(25) == 21", "assert octal_To_Decimal(30) == 24", "assert octal_To_Decimal(40) == 32"]}

Xet Storage Details

Size:
14.7 kB
·
Xet hash:
2edc8acdd215eefb50e9baaa8b9a6d8af6f10786bb6fd6d87ea9a5a748d80098

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.