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 python function to find the first repeated word in a given string.\n\n",
"role": "user"
},
{
"content": "def first_repeated_word(str1):\... |
[
{
"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 given string list to a tuple.\n\n",
"role": "user"
},
{
"content": "def string_list_to_tuple(str1):\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 create a list containing the power of said number in bases raised to the corresponding number in the index using map function.\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 the difference between highest and least frequencies in a given array.\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 if the given number is abundant or not.\n\n",
"role": "user"
},
{
"content": "import math \r\ndef get_sum(n): \r\n\tsum... |
[
{
"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 occurrences of spaces, commas, or dots with a colon in the given string by using regex.\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 add two numbers and print number of digits of sum.\n\n",
"role": "user"
},
{
"content": "def count_digits(num1,num2):\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 flatten the tuple list to a string.\n\n",
"role": "user"
},
{
"content": "def flatten_tuple(test_list):\r\n res = ' '.join(... |
[
{
"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 toggle only first and last bits of a given number.\n\n",
"role": "user"
},
{
"content": "def take_L_and_F_set_bits(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 last occurrence of a character in a string.\n\n",
"role": "user"
},
{
"content": "def last_occurence_char(string,ch... |
[
{
"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 hamming distances of all consecutive numbers from o to n.\n\n",
"role": "user"
},
{
"content": "def T... |
[
{
"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 length of the longest increasing subsequence of the given sequence.\n\n",
"role": "user"
},
{
"content": "def longe... |
[
{
"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 first n odd natural numbers.\n\n",
"role": "user"
},
{
"content": "def odd_Num_Sum(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 maximum element in a sorted and rotated array.\n\n",
"role": "user"
},
{
"content": "def find_Max(arr,low,hi... |
[
{
"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 a specified column from a given nested list.\n\n",
"role": "user"
},
{
"content": "def extract_column(list1, 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 check whether a given sequence is linear or not.\n\n",
"role": "user"
},
{
"content": "def Seq_Linear(seq_nums):\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 the given tuple to a floating-point number.\n\n",
"role": "user"
},
{
"content": "def tuple_to_float(test_tup):\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 odd numbers from a mixed list.\n\n",
"role": "user"
},
{
"content": "def Split(list): \r\n od_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 python function to find the difference between sum of cubes of first n natural numbers and the sum of first n natural numbers.\n\n",
"role": "us... |
[
{
"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 the pairs with xor as an odd number.\n\n",
"role": "user"
},
{
"content": "def find_Odd_Pair(A,N) : \r\n odd... |
[
{
"content": "\nWrite a functional code based on the question given in the QUESTION field.\n",
"role": "system"
},
{
"content": "\nQUESTION:\n\nWrite a function to toggle characters case in a string.\n\n",
"role": "user"
},
{
"content": "def toggle_string(string):\r\n string1 = string.sw... |
[
{
"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 digit distance between two integers.\n\n",
"role": "user"
},
{
"content": "def digit_distance_nums(n1, n2):\... |
[
{
"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 sum of contiguous subarray in the given array.\n\n",
"role": "user"
},
{
"content": "def max_sub_array_sum(... |
[
{
"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 union of elements of the given tuples.\n\n",
"role": "user"
},
{
"content": "def union_elements(test_tup1, 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 assign with each element, its pair elements from other similar pairs in the given tuple.\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 maximum length of sublist.\n\n",
"role": "user"
},
{
"content": "def Find_Max_Length(lst): \r\n maxLengt... |
[
{
"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 values between quotation marks of a string.\n\n",
"role": "user"
},
{
"content": "import re\r\ndef extract_values(te... |
[
{
"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 unequal element pairs from the given array.\n\n",
"role": "user"
},
{
"content": "def count_Pairs(arr,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 split a string into characters.\n\n",
"role": "user"
},
{
"content": "def split(word): \r\n return [char for char ... |
[
{
"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 sum of a non-negative integer.\n\n",
"role": "user"
},
{
"content": "def sum_digits(n):\r\n if n == 0:\r\n retur... |
[
{
"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 a specified list is sorted or not.\n\n",
"role": "user"
},
{
"content": "def issort_list(list1):\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 create a list of empty dictionaries.\n\n",
"role": "user"
},
{
"content": "def empty_list(length):\r\n empty_list = [{} for ... |
[
{
"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 each sublist of strings in a given list of lists.\n\n",
"role": "user"
},
{
"content": "def sort_sublists(list1):\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 remove words from a given list of strings containing a character or string.\n\n",
"role": "user"
},
{
"content": "def remove... |
[
{
"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 possible sum of disjoint pairs for the given array of integers and a number k.\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 remove two duplicate numbers from a given number of lists.\n\n",
"role": "user"
},
{
"content": "def two_unique_nums(... |
[
{
"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 product of the unique numbers of a given list.\n\n",
"role": "user"
},
{
"content": "def unique_product... |
[
{
"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 surface area of a cylinder.\n\n",
"role": "user"
},
{
"content": "def surfacearea_cylinder(r,h):\r\n surfacearea=(... |
[
{
"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 number in a sequence which is not a multiple of a given number.\n\n",
"role": "user"
},
{
"content": "def co... |
[
{
"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 an array is subarray of another or not.\n\n",
"role": "user"
},
{
"content": "def is_Sub_Array(A,B,n,m)... |
[
{
"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 digit in factorial of a given number.\n\n",
"role": "user"
},
{
"content": "def last_Digit_Factorial(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 interleave lists of the same length.\n\n",
"role": "user"
},
{
"content": "def interleave_lists(list1,list2,list3):\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 find the dissimilar elements in the given two tuples.\n\n",
"role": "user"
},
{
"content": "def find_dissimilar(test_tup1, t... |
[
{
"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 the even elements in the nested mixed tuple.\n\n",
"role": "user"
},
{
"content": "def even_ele(test_tuple, even_fnc... |
[
{
"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 surface area of the square pyramid.\n\n",
"role": "user"
},
{
"content": "def surface_Area(b,s): \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 check if a dictionary is empty or not.\n\n",
"role": "user"
},
{
"content": "def my_dict(dict1):\r\n if bool(dict1):\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 for nth catalan number.\n\n",
"role": "user"
},
{
"content": "def catalan_number(num):\r\n if num <=1:\r\n return 1 ... |
[
{
"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 all adverbs and their positions in a given sentence by using regex.\n\n",
"role": "user"
},
{
"content": "import re\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 - expensive price items from a given dataset using heap queue algorithm.\n\n",
"role": "user"
},
{
"content": "im... |
[
{
"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 split the array and add the first part to the end.\n\n",
"role": "user"
},
{
"content": "def split_Arr(a,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 convert a list to a tuple.\n\n",
"role": "user"
},
{
"content": "def list_tuple(listx):\r\n tuplex = tuple(listx)\r\n retu... |
[
{
"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 difference between largest and smallest value in a given array.\n\n",
"role": "user"
},
{
"content": "def bi... |
[
{
"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 perfect squares between two given numbers.\n\n",
"role": "user"
},
{
"content": "def perfect_squares(a, b):\r\n 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 convert polar coordinates to rectangular coordinates.\n\n",
"role": "user"
},
{
"content": "import cmath\r\ndef polar_rect(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 interchange the first and last elements in a list.\n\n",
"role": "user"
},
{
"content": "def swap_List(newList): \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 sum of product of binomial co-efficients.\n\n",
"role": "user"
},
{
"content": "def binomial_Coeff(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 remove leading zeroes from an ip address.\n\n",
"role": "user"
},
{
"content": "import re\r\ndef removezero_ip(ip):\r\n stri... |
[
{
"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 difference of first even and odd number of a given list.\n\n",
"role": "user"
},
{
"content": "def diff_even_odd(li... |
[
{
"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 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 find the size of the given tuple.\n\n",
"role": "user"
},
{
"content": "import sys \r\ndef tuple_size(tuple_list):\r\n retu... |
[
{
"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 kth element from the given two sorted arrays.\n\n",
"role": "user"
},
{
"content": "def find_kth(arr1, arr2, m, n, k):\... |
[
{
"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 number is armstrong or not.\n\n",
"role": "user"
},
{
"content": "def armstrong_number(number):\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 sum and average of first n natural numbers.\n\n",
"role": "user"
},
{
"content": "def sum_average(number):\r\n total = ... |
[
{
"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 is even or not using bitwise operator.\n\n",
"role": "user"
},
{
"content": "def is_Ev... |
[
{
"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 first and last occurrence of a given character from the string.\n\n",
"role": "user"
},
{
"content": "def remo... |
[
{
"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 given matrix in ascending order according to the sum of its rows.\n\n",
"role": "user"
},
{
"content": "def sort_matr... |
[
{
"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 most common words in a dictionary.\n\n",
"role": "user"
},
{
"content": "from collections import Counter\r\ndef co... |
[
{
"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 volume of a triangular prism.\n\n",
"role": "user"
},
{
"content": "def find_Volume(l,b,h) : \r\n return ... |
[
{
"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 lowercase letters.\n\n",
"role": "user"
},
{
"content": "import re\r\ndef split_lowerstring(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 find sequences of lowercase letters joined with an underscore.\n\n",
"role": "user"
},
{
"content": "import re\r\ndef text_l... |
[
{
"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 square.\n\n",
"role": "user"
},
{
"content": "def square_perimeter(a):\r\n perimeter=4*a\r\n retur... |
[
{
"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 characters from the first string which are present in the second string.\n\n",
"role": "user"
},
{
"content": "NO_OF_... |
[
{
"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 whether a given array of integers contains any duplicate element.\n\n",
"role": "user"
},
{
"content": "def test_duplic... |
[
{
"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 number is woodball or not.\n\n",
"role": "user"
},
{
"content": "def is_woodall(x): \r\n\tif (x % 2 == 0)... |
[
{
"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 m number of multiples of n.\n\n",
"role": "user"
},
{
"content": "def multiples_of_num(m,n): \r\n multiples_of_num= ... |
[
{
"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 first duplicate element in a given array of integers.\n\n",
"role": "user"
},
{
"content": "def find_first_duplicat... |
[
{
"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 maximum sum of elements of list in a list of lists.\n\n",
"role": "user"
},
{
"content": "def maximum_Sum(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 convert the given binary number to its decimal equivalent.\n\n",
"role": "user"
},
{
"content": "def binary_to_decimal(binar... |
[
{
"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 product of non-repeated elements in a given array.\n\n",
"role": "user"
},
{
"content": "def find_Product(ar... |
[
{
"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 tuple list has all k elements.\n\n",
"role": "user"
},
{
"content": "def check_k_elements(test_list, K):\... |
[
{
"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 all digits from a list of strings.\n\n",
"role": "user"
},
{
"content": "import re \r\ndef remove(list): \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 binomial co-efficient.\n\n",
"role": "user"
},
{
"content": "def binomial_Coeff(n,k): \r\n if k > 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 element occurring odd number of times.\n\n",
"role": "user"
},
{
"content": "def get_Odd_Occurrence(arr,arr_... |
[
{
"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 all the substrings starting and ending with same characters.\n\n",
"role": "user"
},
{
"content": "def check_Eq... |
[
{
"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 top k integers that occur most frequently from given lists of sorted and distinct integers using heap queue algorithm.\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 the largest prime factor of a given number.\n\n",
"role": "user"
},
{
"content": "import math \r\ndef max_Prime_... |
[
{
"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 decimal number to binary number.\n\n",
"role": "user"
},
{
"content": "def decimal_To_Binary(N): \r\n 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 missing number in a sorted array.\n\n",
"role": "user"
},
{
"content": "def find_missing(ar,N): \r\n l = ... |
[
{
"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 rectangular number.\n\n",
"role": "user"
},
{
"content": "def find_rect_num(n):\r\n return n*(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 the nth digit in the proper fraction of two given numbers.\n\n",
"role": "user"
},
{
"content": "def find_Nth_Di... |
[
{
"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 given mixed list of integers and strings.\n\n",
"role": "user"
},
{
"content": "def sort_mixed_list(mixed_list):\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 division of first even and odd number of a given list.\n\n",
"role": "user"
},
{
"content": "def div_even_odd(list1... |
[
{
"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 letters of a given string can be rearranged so that two characters that are adjacent to each other are different.\n\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 frequency of the elements in a given list of lists using collections module.\n\n",
"role": "user"
},
{
"content": "from... |
[
{
"content": "\nWrite a functional code based on the question given in the QUESTION field.\n",
"role": "system"
},
{
"content": "\nQUESTION:\n\nWrite a function to filter even numbers using lambda function.\n\n",
"role": "user"
},
{
"content": "def filter_evennumbers(nums):\r\n even_nums... |
[
{
"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 repeated elements in a given array.\n\n",
"role": "user"
},
{
"content": "def find_Sum(arr,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 sequences of lowercase letters joined with an underscore using regex.\n\n",
"role": "user"
},
{
"content": "import re\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 at the beginning of a string.\n\n",
"role": "user"
},
{
"content": "import re\r\ndef text_match_string(text... |
[
{
"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 gcd of the given array elements.\n\n",
"role": "user"
},
{
"content": "def find_gcd(x, y): \r\n\twhile(y): \r\n\t\t... |
[
{
"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 determine whether all the numbers are different from each other are not.\n\n",
"role": "user"
},
{
"content": "def te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.