Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
3
3
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the longest chain which can be formed from the given set of pairs.\n\n", "role": "user" }, { "content": "class Pair(obj...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the first repeated character in a given string.\n\n", "role": "user" }, { "content": "def first_repeated_char(st...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to get a lucid number smaller than or equal to n.\n\n", "role": "user" }, { "content": "def get_ludic(n):\r\n\tludics = []\r\n\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to reverse words in a given string.\n\n", "role": "user" }, { "content": "def reverse_words(s):\r\n return ' '.join(reve...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check if the given integer is a prime number.\n\n", "role": "user" }, { "content": "def prime_num(num):\r\n if num >=1:\r\n...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to convert degrees to radians.\n\n", "role": "user" }, { "content": "import math\r\ndef radian_degree(degree):\r\n radian = deg...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to search a literals string in a string and also find the location within the original string where the pattern occurs by using regex.\n\n"...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find nth bell number.\n\n", "role": "user" }, { "content": "def bell_Number(n): \r\n bell = [[0 for i in range(n+1...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find minimum possible value for the given periodic function.\n\n", "role": "user" }, { "content": "def floor_Min(A,B,...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to remove the k'th element from a given list.\n\n", "role": "user" }, { "content": "def remove_kth_element(list1, L):\r\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the maximum of nth column from the given tuple list.\n\n", "role": "user" }, { "content": "def max_of_nth(test_list, N)...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to merge the first and last elements separately in a list of lists.\n\n", "role": "user" }, { "content": "def merge(lst)...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the maximum value in record list as tuple attribute in the given tuple list.\n\n", "role": "user" }, { "content": "def ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the cumulative sum of all the values that are present in the given tuple list.\n\n", "role": "user" }, { "content": "de...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find average value of the numbers in a given tuple of tuples.\n\n", "role": "user" }, { "content": "def average_tuple(nums):...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to perfom the modulo of tuple elements in the given two tuples.\n\n", "role": "user" }, { "content": "def tuple_modulo(test_tup...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\n\n", "role": "use...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to divide two lists using map and lambda function.\n\n", "role": "user" }, { "content": "def div_list(nums1,nums2):\r\n result...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to move all the numbers in it to the given string.\n\n", "role": "user" }, { "content": "def move_num(test_str):\r\n res = ''\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the largest subset where each pair is divisible.\n\n", "role": "user" }, { "content": "def largest_subset(a, n):\r\n\td...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to increment the numeric values in the given strings by k.\n\n", "role": "user" }, { "content": "def increment_numerics(test_li...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the median of two sorted arrays of same size.\n\n", "role": "user" }, { "content": "def get_median(arr1, arr2, n):\r\n ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the n-th power of individual elements in a list using lambda function.\n\n", "role": "user" }, { "content": "def nth_nu...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to convert the given string to upper case.\n\n", "role": "user" }, { "content": "def is_upper(string):\r\n return (stri...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to interchange first and last elements in a given list.\n\n", "role": "user" }, { "content": "def swap_List(newList): \r...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the largest triangle that can be inscribed in the semicircle.\n\n", "role": "user" }, { "content": "def triangle...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the smallest missing number from the given array.\n\n", "role": "user" }, { "content": "def find_First_Missing(a...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to replace all spaces in the given string with character * list item * list item * list item * list item '%20'.\n\n", "role": "user" ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find even numbers from a mixed list.\n\n", "role": "user" }, { "content": "def Split(list): \r\n ev_li = [] \r\n ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to extract all the adjacent coordinates of the given coordinate tuple.\n\n", "role": "user" }, { "content": "def adjac(ele, sub...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to replace whitespaces with an underscore and vice versa in a given string by using regex.\n\n", "role": "user" }, { "content":...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to move all zeroes to the end of the given list.\n\n", "role": "user" }, { "content": "def move_zero(num_list):\r\n a...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the sum of xor of all pairs of numbers in the given array.\n\n", "role": "user" }, { "content": "def pair_OR_Sum...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the sum of fourth power of first n even natural numbers.\n\n", "role": "user" }, { "content": "def even_Power_Su...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to push all values into a heap and then pop off the smallest values one at a time.\n\n", "role": "user" }, { "content": "import...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to check if roots of a quadratic equation are reciprocal of each other or not.\n\n", "role": "user" }, { "content": "def...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check whether the given amount has no profit and no loss\n\n", "role": "user" }, { "content": "def noprofit_noloss(actual_co...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to calculate wind chill index.\n\n", "role": "user" }, { "content": "import math\r\ndef wind_chill(v,t):\r\n windchill = 13.12 ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite 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.\n\n", "role": "use...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to remove the parenthesis area in a string.\n\n", "role": "user" }, { "content": "import re\r\ndef remove_parenthesis(items):\r...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the nth nonagonal number.\n\n", "role": "user" }, { "content": "def is_nonagonal(n): \r\n\treturn int(n * (7 * n - 5) /...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to remove similar rows from the given tuple matrix.\n\n", "role": "user" }, { "content": "def remove_similar_row(test_list):\r\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function that matches a word containing 'z', not at the start or end of the word.\n\n", "role": "user" }, { "content": "import re\r\ndef...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to reverse an array upto a given position.\n\n", "role": "user" }, { "content": "def reverse_Array_Upto_K(input, k): \r\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the product of it’s kth index in the given tuples.\n\n", "role": "user" }, { "content": "def get_product(val) : \r\n\tr...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to count number of cubes of size k in a cube of size n.\n\n", "role": "user" }, { "content": "def No_of_cubes(N,K):\r\n ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to split a string at uppercase letters.\n\n", "role": "user" }, { "content": "import re\r\ndef split_upperstring(text):\r\n ret...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite 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.\n\n", "role": "user"...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to calculate the sum of the numbers in a list between the indices of a specified range.\n\n", "role": "user" }, { "conte...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to check whether the given two arrays are equal or not.\n\n", "role": "user" }, { "content": "def are_Equal(arr1,arr2,n,...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check if one tuple is a subset of another tuple.\n\n", "role": "user" }, { "content": "def check_subset(test_tup1, test_tup2...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to flatten the given tuple matrix into the tuple list with each tuple representing each column.\n\n", "role": "user" }, { "cont...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to group a sequence of key-value pairs into a dictionary of lists using collections module.\n\n", "role": "user" }, { "content"...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the perimeter of a rectangle.\n\n", "role": "user" }, { "content": "def rectangle_perimeter(l,b):\r\n perimeter=2*(l+b...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the sum of fifth power of n natural numbers.\n\n", "role": "user" }, { "content": "def fifth_Power_Sum(n) : \r\n...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the minimum sum of absolute differences of two arrays.\n\n", "role": "user" }, { "content": "def find_Min_Sum(a,...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the first digit in factorial of a given number.\n\n", "role": "user" }, { "content": "import math \r\ndef first_...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the item with maximum occurrences in a given list.\n\n", "role": "user" }, { "content": "def max_occurrences(list1):\r\...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to print duplicants from a list of integers.\n\n", "role": "user" }, { "content": "def Repeat(x): \r\n _size = len(x)...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to choose points from two ranges such that no point lies in both the ranges.\n\n", "role": "user" }, { "content": "def f...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the maximum sum that can be formed which has no three consecutive elements present.\n\n", "role": "user" }, { "content"...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to sort a list in a dictionary.\n\n", "role": "user" }, { "content": "def sorted_dict(dict1):\r\n sorted_dict = {x: sorted(y) ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the largest possible value of k such that k modulo x is y.\n\n", "role": "user" }, { "content": "import sys \r\ndef fin...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the average of even numbers till a given even number.\n\n", "role": "user" }, { "content": "def average_Even(n) ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to shift first element to the end of given list.\n\n", "role": "user" }, { "content": "def move_last(num_list):\r\n a...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to count occurrence of a character in a string.\n\n", "role": "user" }, { "content": "def count_char(string,char):\r\n count = ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to count number of vowels in the string.\n\n", "role": "user" }, { "content": "def Check_Vow(string, vowels): \r\n fi...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to replace multiple occurence of character by single.\n\n", "role": "user" }, { "content": "import re \r\ndef replace(st...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check whether the given ip address is valid or not using regex.\n\n", "role": "user" }, { "content": "import re \r\nregex = ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to check whether a sequence of numbers has a decreasing trend or not.\n\n", "role": "user" }, { "content": "def decreasi...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to set the right most unset bit.\n\n", "role": "user" }, { "content": "import math \r\ndef get_Pos_Of_Right_most_Set_Bit...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find maximum of three numbers.\n\n", "role": "user" }, { "content": "def max_of_three(num1,num2,num3): \r\n if (num1 >= n...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to convert a list of multiple integers into a single integer.\n\n", "role": "user" }, { "content": "def convert(list): \...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to remove duplicate words from a given string using collections module.\n\n", "role": "user" }, { "content": "from collections ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to add two integers. however, if the sum is between the given range it will return 20.\n\n", "role": "user" }, { "content": "de...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to remove everything except alphanumeric characters from the given string by using regex.\n\n", "role": "user" }, { "content": ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check if the triangle is valid or not.\n\n", "role": "user" }, { "content": "def validity_triangle(a,b,c):\r\n total = a + b...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to remove spaces from a given string.\n\n", "role": "user" }, { "content": "def remove_spaces(str1):\r\n str1 = str1.re...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to access dictionary key’s element by index.\n\n", "role": "user" }, { "content": "def access_key(ditionary,key):\r\n return l...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to check whether a sequence of numbers has an increasing trend or not.\n\n", "role": "user" }, { "content": "def increas...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the smallest prime divisor of a number.\n\n", "role": "user" }, { "content": "def smallest_Divisor(n): \r\n i...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to multiply two lists using map and lambda function.\n\n", "role": "user" }, { "content": "def mul_list(nums1,nums2):\r\n resu...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to check whether the given number can be represented by sum of two squares or not.\n\n", "role": "user" }, { "content": ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to count occurences of a character in a repeated string.\n\n", "role": "user" }, { "content": "def count_Char(str,x): \r...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find sum of prime numbers between 1 to n.\n\n", "role": "user" }, { "content": "def sum_Of_Primes(n): \r\n prime =...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the frequency of each element in the given list.\n\n", "role": "user" }, { "content": "from collections import defaultd...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find the greatest common divisor (gcd) of two integers by using recursion.\n\n", "role": "user" }, { "content": "def recur_g...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to get the length of a complex number.\n\n", "role": "user" }, { "content": "import cmath\r\ndef len_complex(a,b):\r\n cn=comp...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\n## 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 ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to multiply consecutive numbers of a given list.\n\n", "role": "user" }, { "content": "def mul_consecutive_nums(nums):\r\n r...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to group the 1st elements on the basis of 2nd elements in the given tuple list.\n\n", "role": "user" }, { "content": "from iter...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the last two digits in factorial of a given number.\n\n", "role": "user" }, { "content": "def last_Two_Digits(N)...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to remove multiple spaces in a string by using regex.\n\n", "role": "user" }, { "content": "import re\r\ndef remove_multiple_sp...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to extract unique values from the given dictionary values.\n\n", "role": "user" }, { "content": "def extract_unique(test_dict):...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to check if each element of the second tuple is greater than its corresponding index in the first tuple.\n\n", "role": "user" }, { ...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to zip two given lists of lists.\n\n", "role": "user" }, { "content": "def zip_list(list1,list2): \r\n result = list(map(list....
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to find number of even elements in the given list using lambda function.\n\n", "role": "user" }, { "content": "def count_even(a...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to sort dictionary items by tuple product of keys for the given dictionary with tuple keys.\n\n", "role": "user" }, { "content"...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a python function to find the minimum number of swaps required to convert one binary string to another.\n\n", "role": "user" }, { "content...
[ { "content": "\nWrite a functional code based on the question given in the QUESTION field.\n", "role": "system" }, { "content": "\nQUESTION:\n\nWrite a function to count the number of elements in a list which are within a specific range.\n\n", "role": "user" }, { "content": "def count_ra...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5