task_id
int64 | text
string | code
string | test_list
list | test_setup_code
string | challenge_test_list
list | context
string | context_id
string | context_length_tokens
int64 | code_length_chars
int64 |
|---|---|---|---|---|---|---|---|---|---|
49
|
Write a function to extract every first or specified element from a given two-dimensional list.
|
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
|
[
"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]"
] |
[] |
Sandra journeyed to the bedroom. Daniel travelled to the hallway. Mary moved to the bathroom. Daniel picked up the apple there. Sandra travelled to the office. Mary picked up the football there. Sandra went back to the hallway. Daniel discarded the apple. Mary moved to the office. Sandra grabbed the apple there. Daniel journeyed to the kitchen. Sandra left the apple there. Daniel journeyed to the hallway. Daniel took the apple there. Daniel moved to the kitchen. Daniel went to the bedroom. Sandra travelled to the bathroom. Daniel dropped the apple.
|
babilong_0k_qa2_sample_94
| 114
| 91
|
|
357
|
Write a function to find the maximum element of all the given tuple records.
|
def find_max(test_list):
res = max(int(j) for i in test_list for j in i)
return (res)
|
[
"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"
] |
[] |
John travelled to the office. Daniel went back to the garden. John went back to the kitchen. Daniel went back to the hallway. Sandra journeyed to the bedroom. Daniel moved to the bedroom. John grabbed the football there. Daniel journeyed to the garden. John put down the football. John took the apple there. John journeyed to the office. Mary journeyed to the hallway. Mary journeyed to the kitchen. John picked up the milk there. Mary got the football there. Sandra journeyed to the hallway. Mary left the football. John left the apple.
|
babilong_0k_qa2_sample_33
| 117
| 92
|
|
51
|
Write a function to print check if the triangle is equilateral or not.
|
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False
|
[
"assert check_equilateral(6,8,12)==False ",
"assert check_equilateral(6,6,12)==False",
"assert check_equilateral(6,6,6)==True"
] |
[] |
Daniel went back to the garden. Mary got the apple. Sandra travelled to the bedroom. Daniel travelled to the office. Mary went back to the office. Mary left the apple. Mary moved to the bathroom. Mary moved to the bedroom. Sandra journeyed to the office. Sandra grabbed the apple. John went back to the hallway. John went back to the bedroom. Sandra discarded the apple. Sandra got the apple. John went back to the bathroom. Mary travelled to the bathroom. Daniel went to the hallway. Sandra travelled to the bathroom. Mary journeyed to the garden. John went back to the hallway. Mary moved to the bedroom. John journeyed to the garden. John moved to the bedroom. Sandra travelled to the office. Mary moved to the bathroom. Daniel moved to the bedroom. Sandra moved to the bathroom. Sandra put down the apple there. John journeyed to the office. Sandra went back to the bedroom. John moved to the bathroom. John grabbed the apple. John left the apple. Mary went to the bedroom. John took the apple. Daniel moved to the office. Mary went to the kitchen. John journeyed to the bedroom. Mary took the football. Daniel went to the bathroom. Daniel journeyed to the kitchen. John went to the bathroom. Sandra travelled to the hallway. John left the apple.
|
babilong_0k_qa3_sample_13
| 269
| 93
|
|
95
|
Write a python function to find the minimum length of sublist.
|
def Find_Min_Length(lst):
minLength = min(len(x) for x in lst )
return minLength
|
[
"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"
] |
[] |
John got the milk. Mary got the football. Mary took the apple. Mary put down the football. Mary left the apple. Sandra moved to the bedroom. John moved to the bathroom. Mary got the football. Mary moved to the bathroom. John went to the office. Mary went back to the office. Mary got the apple. Mary travelled to the bathroom. Sandra journeyed to the garden. Mary put down the apple. John went to the kitchen. John put down the milk. Daniel took the milk. Mary picked up the apple. John journeyed to the hallway. Daniel went to the garden. John travelled to the garden. John went back to the kitchen. Daniel went back to the bathroom. Daniel left the milk. Daniel picked up the milk. Sandra went to the kitchen. John went back to the office. Daniel dropped the milk. Sandra travelled to the office. John journeyed to the bedroom. John travelled to the garden. Mary got the milk. Sandra journeyed to the bedroom. Daniel went to the hallway. Sandra moved to the bathroom. Sandra journeyed to the office. John moved to the bathroom. Mary discarded the apple. Mary picked up the apple. Mary left the milk. Sandra went back to the bedroom. Mary got the milk. Mary put down the football there. John got the football. Mary put down the milk. John left the football there. Mary dropped the apple. Mary grabbed the milk. Sandra journeyed to the bathroom. Mary got the football. Mary moved to the bedroom. Daniel journeyed to the kitchen. Sandra took the apple. Sandra dropped the apple. John picked up the apple. Sandra travelled to the kitchen. John moved to the office. John dropped the apple. John took the apple. John dropped the apple. Mary put down the milk there. Mary moved to the kitchen. John picked up the apple there. John put down the apple. Sandra journeyed to the bedroom. Daniel went back to the office. Mary put down the football.
|
babilong_0k_qa3_sample_50
| 404
| 93
|
|
312
|
Write a function to find the volume of a cone.
|
import math
def volume_cone(r,h):
volume = (1.0/3) * math.pi * r * r * h
return volume
|
[
"assert volume_cone(5,12)==314.15926535897927",
"assert volume_cone(10,15)==1570.7963267948965",
"assert volume_cone(19,17)==6426.651371693521"
] |
[] |
Sandra went to the kitchen. Mary went to the hallway. John journeyed to the office. Daniel went back to the office. Daniel went back to the kitchen. Daniel travelled to the garden. John travelled to the hallway. John went back to the office. Mary went to the bedroom. Mary travelled to the hallway.
|
babilong_0k_qa1_sample_55
| 66
| 93
|
|
450
|
Write a function to extract specified size of strings from a give list of string values.
|
def extract_string(str, l):
result = [e for e in str if len(e) == l]
return result
|
[
"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']"
] |
[] |
John went to the kitchen. Daniel travelled to the kitchen.
|
babilong_0k_qa1_sample_54
| 13
| 93
|
|
491
|
Write a function to find the sum of geometric progression series.
|
import math
def sum_gp(a,n,r):
total = (a * (1 - math.pow(r, n ))) / (1- r)
return total
|
[
"assert sum_gp(1,5,2)==31",
"assert sum_gp(1,5,4)==341",
"assert sum_gp(2,6,3)==728"
] |
[] |
The hallway is north of the bedroom. The bedroom is north of the garden.
|
babilong_0k_qa4_sample_39
| 17
| 93
|
|
464
|
Write a function to check if all values are same in a dictionary.
|
def check_value(dict, n):
result = all(x == n for x in dict.values())
return result
|
[
"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"
] |
[] |
Daniel moved to the kitchen. Mary went to the office. John went to the office. Daniel picked up the milk there. Daniel left the milk. Sandra went back to the kitchen. Mary travelled to the hallway. Mary went back to the bedroom. Daniel moved to the office. John moved to the kitchen. John took the milk. John went back to the office. Daniel moved to the kitchen. Sandra moved to the bedroom. John went back to the bathroom. Mary picked up the apple. Mary went back to the office. John went to the office. Mary discarded the apple. John got the apple. Daniel went back to the bedroom. John discarded the milk. Sandra moved to the office. Sandra took the milk. John discarded the apple. Mary grabbed the apple. Mary put down the apple. John picked up the apple. Daniel went to the bathroom. Daniel journeyed to the kitchen. John put down the apple. Mary moved to the hallway. John moved to the bathroom. Daniel journeyed to the hallway. Sandra travelled to the garden. Mary travelled to the garden. Daniel moved to the bathroom. Mary picked up the football there. John went to the office. Mary put down the football. Sandra got the football. Daniel travelled to the office. John went to the kitchen. Sandra put down the milk. John travelled to the bathroom. Mary took the milk. John journeyed to the office. John went back to the hallway. Daniel took the apple there. Mary discarded the milk there. John journeyed to the garden. Daniel travelled to the bedroom. Sandra journeyed to the bathroom. John journeyed to the hallway. John went back to the bedroom. Sandra went back to the garden. Sandra left the football there. Sandra moved to the office. Mary got the football. Mary put down the football. John journeyed to the kitchen. Daniel dropped the apple there. Daniel got the apple. Sandra went to the garden. Mary got the football. Daniel moved to the kitchen. Sandra went back to the office. Sandra travelled to the bathroom. Mary got the milk. Mary journeyed to the bedroom. Daniel left the apple. Daniel grabbed the apple. Sandra moved to the hallway. Daniel dropped the apple. Mary went to the office. Daniel took the apple there. Mary left the football. Mary moved to the bathroom.
|
babilong_0k_qa3_sample_58
| 471
| 94
|
|
106
|
Write a function to add the given list to the given tuples.
|
def add_lists(test_list, test_tup):
res = tuple(list(test_tup) + test_list)
return (res)
|
[
"assert add_lists([5, 6, 7], (9, 10)) == (9, 10, 5, 6, 7)",
"assert add_lists([6, 7, 8], (10, 11)) == (10, 11, 6, 7, 8)",
"assert add_lists([7, 8, 9], (11, 12)) == (11, 12, 7, 8, 9)"
] |
[] |
The office is north of the hallway. The kitchen is south of the hallway.
|
babilong_0k_qa4_sample_92
| 17
| 95
|
|
375
|
Write a function to round the given number to the nearest multiple of a specific number.
|
def round_num(n,m):
a = (n //m) * m
b = a + m
return (b if n - a > b - n else a)
|
[
"assert round_num(4722,10)==4720",
"assert round_num(1111,5)==1110",
"assert round_num(219,2)==218"
] |
[] |
Jeff went back to the garden. Mary journeyed to the garden. Jeff took the football there. Bill journeyed to the garden. Mary took the milk there. Jeff handed the football to Mary. Mary handed the football to Bill. Bill put down the football. Fred went back to the bathroom. Mary got the apple there.
|
babilong_0k_qa5_sample_26
| 67
| 95
|
|
378
|
Write a python function to shift last element to first position in the given list.
|
def move_first(test_list):
test_list = test_list[-1:] + test_list[:-1]
return test_list
|
[
"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]"
] |
[] |
Mary went back to the kitchen. Daniel travelled to the office. Mary moved to the hallway. John went to the kitchen. Daniel went back to the bathroom. John travelled to the bathroom. Daniel moved to the kitchen. Sandra moved to the kitchen. John grabbed the football there. Sandra journeyed to the bathroom. John discarded the football. John grabbed the football there. John went back to the bedroom. Sandra went to the office. Mary moved to the garden. Daniel went to the bathroom. John moved to the office. Mary picked up the milk there. Sandra got the apple there. Sandra travelled to the bedroom. Daniel moved to the office. Sandra left the apple.
|
babilong_0k_qa2_sample_43
| 136
| 95
|
|
390
|
Write a function to insert a given string at the beginning of all items in a list.
|
def add_string(list,string):
add_string=[string.format(i) for i in list]
return add_string
|
[
"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']"
] |
[] |
Daniel journeyed to the bedroom. Sandra went back to the office. Daniel travelled to the garden. John went back to the bathroom.
|
babilong_0k_qa1_sample_79
| 28
| 95
|
|
240
|
Write a function to replace the last element of the list with another list.
|
def replace_list(list1,list2):
list1[-1:] = list2
replace_list=list1
return replace_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\"]"
] |
[] |
Sandra journeyed to the kitchen. Sandra went back to the bedroom. Daniel went back to the garden. Daniel travelled to the bathroom. John moved to the bathroom. Mary went to the bedroom. Mary travelled to the office. Mary journeyed to the hallway. John went to the bedroom. Daniel moved to the garden. Daniel grabbed the apple there. John travelled to the kitchen. Daniel travelled to the bedroom. John picked up the milk there. Mary moved to the bathroom. John grabbed the football there. Sandra journeyed to the hallway. Sandra journeyed to the kitchen. Daniel went to the hallway. Daniel journeyed to the kitchen. John journeyed to the bathroom. John left the football. John dropped the milk. Mary grabbed the football there.
|
babilong_0k_qa2_sample_56
| 153
| 96
|
|
398
|
Write a function to compute the sum of digits of each number of a given list.
|
def sum_of_digits(nums):
return sum(int(el) for n in nums for el in str(n) if el.isdigit())
|
[
"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"
] |
[] |
Daniel journeyed to the garden. Mary moved to the hallway. Daniel journeyed to the bedroom. John picked up the football there. John discarded the football. Daniel went to the hallway. Sandra went back to the bathroom. John picked up the football there. John journeyed to the garden. Sandra went back to the bedroom. John journeyed to the bathroom. Daniel journeyed to the bedroom.
|
babilong_0k_qa2_sample_84
| 81
| 96
|
|
143
|
Write a function to find number of lists present in the given tuple.
|
def find_lists(Input):
if isinstance(Input, list):
return 1
else:
return len(Input)
|
[
"assert find_lists(([1, 2, 3, 4], [5, 6, 7, 8])) == 2",
"assert find_lists(([1, 2], [3, 4], [5, 6])) == 3",
"assert find_lists(([9, 8, 7, 6, 5, 4, 3, 2, 1])) == 1"
] |
[] |
Mary moved to the office. Jeff took the apple there. Fred went to the hallway. Bill grabbed the football there. Jeff went back to the kitchen. Mary picked up the milk there. Bill went to the bedroom. Fred travelled to the garden. Fred travelled to the bathroom. Bill went back to the hallway. Mary dropped the milk. Bill dropped the football. Mary went to the garden. Bill went back to the office. Jeff moved to the bedroom. Bill got the milk there. Bill travelled to the bathroom. Bill handed the milk to Fred. Fred gave the milk to Bill. Jeff travelled to the garden.
|
babilong_0k_qa5_sample_88
| 125
| 97
|
|
124
|
Write a function to get the angle of a complex number.
|
import cmath
def angle_complex(a,b):
cn=complex(a,b)
angle=cmath.phase(a+b)
return angle
|
[
"assert angle_complex(0,1j)==1.5707963267948966 ",
"assert angle_complex(2,1j)==0.4636476090008061",
"assert angle_complex(0,2j)==1.5707963267948966"
] |
[] |
Mary travelled to the bedroom. John went back to the hallway.
|
babilong_0k_qa1_sample_21
| 14
| 98
|
|
238
|
Write a python function to count number of non-empty substrings of a given string.
|
def number_of_substrings(str):
str_len = len(str);
return int(str_len * (str_len + 1) / 2);
|
[
"assert number_of_substrings(\"abc\") == 6",
"assert number_of_substrings(\"abcd\") == 10",
"assert number_of_substrings(\"abcde\") == 15"
] |
[] |
Mary journeyed to the garden. John went back to the garden.
|
babilong_0k_qa1_sample_86
| 15
| 98
|
|
412
|
Write a python function to remove odd numbers from a given list.
|
def remove_odd(l):
for i in l:
if i % 2 != 0:
l.remove(i)
return l
|
[
"assert remove_odd([1,2,3]) == [2]",
"assert remove_odd([2,4,6]) == [2,4,6]",
"assert remove_odd([10,20,3]) == [10,20]"
] |
[] |
Sandra went to the office. John travelled to the bedroom. John got the apple. Sandra travelled to the kitchen. Sandra journeyed to the bathroom. John put down the apple. Sandra went back to the bedroom. Mary moved to the bedroom. Daniel travelled to the hallway. Mary took the apple. Daniel travelled to the garden. John went back to the bathroom. John moved to the hallway. John journeyed to the garden. Mary left the apple. Sandra travelled to the hallway. Sandra went to the bedroom. Sandra went back to the office. Daniel journeyed to the bathroom. Mary travelled to the bathroom. Daniel moved to the bedroom. Sandra journeyed to the hallway. Mary moved to the hallway. Mary travelled to the bathroom. Daniel grabbed the apple. Daniel moved to the bathroom. Daniel left the apple. John went back to the hallway. Mary picked up the apple. Mary dropped the apple there. Daniel took the apple. Daniel dropped the apple. Daniel picked up the apple. Daniel went back to the bedroom. Mary journeyed to the office. Sandra went to the kitchen. Mary went to the kitchen. Daniel left the apple there. Daniel got the apple. Mary went back to the hallway. John travelled to the garden. Daniel discarded the apple. Daniel journeyed to the kitchen. Daniel moved to the hallway. John journeyed to the office. Sandra travelled to the bathroom. Daniel moved to the bedroom. John went to the bedroom. John picked up the apple. John journeyed to the garden. Mary went to the office. John travelled to the bedroom. John journeyed to the office. John discarded the apple.
|
babilong_0k_qa3_sample_80
| 331
| 98
|
|
426
|
Write a function to filter odd numbers using lambda function.
|
def filter_oddnumbers(nums):
odd_nums = list(filter(lambda x: x%2 != 0, nums))
return odd_nums
|
[
"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]"
] |
[] |
The bathroom is south of the bedroom. The office is north of the bedroom.
|
babilong_0k_qa4_sample_45
| 17
| 98
|
|
177
|
Write a python function to find two distinct numbers such that their lcm lies within the given range.
|
def answer(L,R):
if (2 * L <= R):
return (L ,2*L)
else:
return (-1)
|
[
"assert answer(3,8) == (3,6)",
"assert answer(2,6) == (2,4)",
"assert answer(1,3) == (1,2)"
] |
[] |
Bill grabbed the apple there. Bill handed the apple to Mary. Jeff went back to the garden. Fred travelled to the bedroom. Mary passed the apple to Bill. Fred went back to the garden.
|
babilong_0k_qa5_sample_73
| 41
| 99
|
|
248
|
Write a function to calculate the harmonic sum of n-1.
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
[
"assert harmonic_sum(7) == 2.5928571428571425",
"assert harmonic_sum(4) == 2.083333333333333",
"assert harmonic_sum(19) == 3.547739657143682"
] |
[] |
The hallway is north of the garden. The garden is north of the bedroom.
|
babilong_0k_qa4_sample_66
| 17
| 99
|
|
282
|
Write a function to substaract two lists using map and lambda function.
|
def sub_list(nums1,nums2):
result = map(lambda x, y: x - y, nums1, nums2)
return list(result)
|
[
"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]"
] |
[] |
Fred took the milk there. Jeff got the football there. Fred left the milk. Bill went back to the office. Fred travelled to the hallway. Bill travelled to the kitchen. Fred went to the bedroom. Jeff handed the football to Mary. Mary passed the football to Jeff. Jeff handed the football to Mary.
|
babilong_0k_qa5_sample_16
| 64
| 99
|
|
366
|
Write a python function to find the largest product of the pair of adjacent elements from a given list of integers.
|
def adjacent_num_product(list_nums):
return max(a*b for a, b in zip(list_nums, list_nums[1:]))
|
[
"assert adjacent_num_product([1,2,3,4,5,6]) == 30",
"assert adjacent_num_product([1,2,3,4,5]) == 20",
"assert adjacent_num_product([2,3]) == 6"
] |
[] |
The bathroom is north of the hallway. The office is south of the hallway.
|
babilong_0k_qa4_sample_26
| 17
| 99
|
|
456
|
Write a function to reverse strings in a given list of string values.
|
def reverse_string_list(stringlist):
result = [x[::-1] for x in stringlist]
return result
|
[
"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']"
] |
[] |
Sandra journeyed to the garden. Daniel got the football there. Mary went back to the kitchen. Sandra went back to the hallway. Daniel put down the football there. Daniel journeyed to the kitchen. Sandra moved to the garden. Mary went back to the office. Mary moved to the kitchen. John travelled to the bathroom. Mary moved to the office. Mary got the apple there. Daniel moved to the office. Daniel got the milk there. Mary went back to the garden. Daniel left the milk. John travelled to the office. Mary put down the apple. Daniel went to the bathroom. John got the milk there. John travelled to the bathroom. John dropped the milk there. Sandra picked up the apple there. Daniel moved to the office.
|
babilong_0k_qa2_sample_23
| 153
| 99
|
|
251
|
Write a function to insert an element before each element of a list.
|
def insert_element(list,element):
list = [v for elt in list for v in (element, elt)]
return list
|
[
"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'] "
] |
[] |
The bathroom is west of the hallway. The hallway is west of the office.
|
babilong_0k_qa4_sample_42
| 17
| 100
|
|
327
|
Write a function to print check if the triangle is isosceles or not.
|
def check_isosceles(x,y,z):
if x==y or y==z or z==x:
return True
else:
return False
|
[
"assert check_isosceles(6,8,12)==False ",
"assert check_isosceles(6,6,12)==True",
"assert check_isosceles(6,16,20)==False"
] |
[] |
Mary took the apple there. Bill went to the garden. Bill went to the bathroom. Jeff moved to the office. Bill travelled to the bedroom. Jeff travelled to the hallway. Mary gave the apple to Fred. Mary travelled to the office. Mary took the milk there. Mary discarded the milk. Mary picked up the milk there. Bill went back to the garden. Fred passed the apple to Bill. Mary went to the kitchen. Jeff went to the garden. Bill gave the apple to Fred. Fred gave the apple to Bill. Mary travelled to the hallway.
|
babilong_0k_qa5_sample_68
| 114
| 100
|
|
41
|
Write a function to filter even numbers using lambda function.
|
def filter_evennumbers(nums):
even_nums = list(filter(lambda x: x%2 == 0, nums))
return even_nums
|
[
"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]"
] |
[] |
Daniel got the football there. Mary travelled to the garden. Mary moved to the bedroom. Daniel moved to the office. Daniel travelled to the hallway. Daniel left the football. Mary went to the bathroom. Daniel picked up the football there. Sandra went back to the hallway. Daniel picked up the milk there. Mary went to the kitchen. Daniel moved to the garden. Mary journeyed to the hallway. Daniel left the football.
|
babilong_0k_qa2_sample_74
| 87
| 101
|
|
211
|
Write a python function to count numbers whose oth and nth bits are set.
|
def count_Num(n):
if (n == 1):
return 1
count = pow(2,n - 2)
return count
|
[
"assert count_Num(2) == 1",
"assert count_Num(3) == 2",
"assert count_Num(1) == 1"
] |
[] |
The garden is west of the bathroom. The bathroom is west of the bedroom.
|
babilong_0k_qa4_sample_55
| 17
| 101
|
|
424
|
Write a function to extract only the rear index element of each string in the given tuple.
|
def extract_rear(test_tuple):
res = list(sub[len(sub) - 1] for sub in test_tuple)
return (res)
|
[
"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']"
] |
[] |
Sandra got the football there. John journeyed to the hallway. John journeyed to the office. Daniel travelled to the bedroom. John went to the bedroom. Mary went back to the kitchen. John journeyed to the bathroom. Sandra journeyed to the bedroom. Sandra put down the football. Sandra picked up the football there. John went back to the hallway. Daniel moved to the bathroom. John grabbed the milk there. Mary travelled to the garden. Sandra moved to the hallway. Daniel went back to the office. Sandra left the football there. John grabbed the football there. John dropped the football. John discarded the milk there.
|
babilong_0k_qa2_sample_37
| 129
| 101
|
|
500
|
Write a function to concatenate all elements of the given list into a string.
|
def concatenate_elements(list):
ans = ' '
for i in list:
ans = ans+ ' '+i
return (ans)
|
[
"assert concatenate_elements(['hello','there','have','a','rocky','day'] ) == ' hello there have a rocky day'",
"assert concatenate_elements([ 'Hi', 'there', 'How','are', 'you'] ) == ' Hi there How are you'",
"assert concatenate_elements([ 'Part', 'of', 'the','journey', 'is', 'end'] ) == ' Part of the journey is end'"
] |
[] |
Mary travelled to the bedroom. Bill took the milk there. Mary grabbed the football there. Bill gave the milk to Jeff. Mary discarded the football. Jeff put down the milk.
|
babilong_0k_qa5_sample_74
| 37
| 101
|
|
96
|
Write a python function to find the number of divisors of a given integer.
|
def divisor(n):
for i in range(n):
x = len([i for i in range(1,n+1) if not n % i])
return x
|
[
"assert divisor(15) == 4 ",
"assert divisor(12) == 6",
"assert divisor(9) == 3"
] |
[] |
Sandra took the apple there. Daniel went back to the bedroom. Daniel travelled to the bathroom. John went to the bathroom. Mary journeyed to the bedroom. Daniel moved to the bedroom. Sandra moved to the bedroom. Daniel got the milk there. Daniel dropped the milk. Sandra picked up the milk there. Sandra put down the apple there. Mary picked up the apple there. Mary travelled to the bathroom. Sandra discarded the milk. Daniel took the milk there. John moved to the kitchen. Mary dropped the apple. Mary travelled to the office. Mary grabbed the football there. Daniel went back to the kitchen. Mary went back to the garden. John journeyed to the bathroom.
|
babilong_0k_qa2_sample_62
| 139
| 102
|
|
196
|
Write a function to remove all the tuples with length k.
|
def remove_tuples(test_list, K):
res = [ele for ele in test_list if len(ele) != K]
return (res)
|
[
"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,)]"
] |
[] |
The bathroom is east of the office. The kitchen is east of the bathroom.
|
babilong_0k_qa4_sample_89
| 17
| 102
|
|
221
|
Write a python function to find the first even number in a given list of numbers.
|
def first_even(nums):
first_even = next((el for el in nums if el%2==0),-1)
return first_even
|
[
"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"
] |
[] |
John went back to the bedroom. John journeyed to the kitchen. John took the milk there. Sandra took the football there. Daniel travelled to the hallway. Daniel picked up the apple there. Mary travelled to the bedroom. Daniel journeyed to the bedroom.
|
babilong_0k_qa2_sample_17
| 53
| 102
|
|
310
|
Write a function to convert a given string to a tuple.
|
def string_to_tuple(str1):
result = tuple(x for x in str1 if not x.isspace())
return result
|
[
"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')"
] |
[] |
Sandra went to the bedroom. John travelled to the office. John travelled to the bedroom. Sandra went back to the kitchen. Sandra went back to the garden. John went back to the office. Daniel went to the hallway. Daniel went to the bathroom. Daniel travelled to the kitchen. Daniel travelled to the garden.
|
babilong_0k_qa1_sample_90
| 65
| 102
|
|
358
|
Write a function to find modulo division of two lists using map and lambda function.
|
def moddiv_list(nums1,nums2):
result = map(lambda x, y: x % y, nums1, nums2)
return list(result)
|
[
"assert moddiv_list([4,5,6],[1, 2, 3])==[0, 1, 0]",
"assert moddiv_list([3,2],[1,4])==[0, 2]",
"assert moddiv_list([90,120],[50,70])==[40, 50]"
] |
[] |
John went back to the bedroom. Daniel took the apple there. Mary journeyed to the bedroom. Mary journeyed to the bathroom. John journeyed to the hallway. Sandra went back to the bedroom. Sandra went back to the hallway. Sandra travelled to the kitchen. John journeyed to the kitchen. John travelled to the bedroom. Sandra picked up the milk there. Daniel left the apple. Daniel got the apple there. John travelled to the office. Sandra discarded the milk. Sandra grabbed the milk there. Sandra went back to the hallway. Sandra got the football there. Daniel put down the apple. Daniel went back to the kitchen. Mary moved to the bedroom. Mary grabbed the apple there. Mary put down the apple. Sandra moved to the garden. Sandra left the milk. Sandra went to the kitchen.
|
babilong_0k_qa2_sample_90
| 164
| 102
|
|
405
|
Write a function to check whether an element exists within a tuple.
|
def check_tuplex(tuplex,tuple1):
if tuple1 in tuplex:
return True
else:
return False
|
[
"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)==True"
] |
[] |
Daniel journeyed to the garden. John moved to the garden. Sandra moved to the bedroom. John went back to the office. John went back to the bedroom. Daniel went back to the bedroom. John went to the office. Sandra went to the garden.
|
babilong_0k_qa1_sample_70
| 53
| 102
|
|
411
|
Write a function to convert the given snake case string to camel case string by using regex.
|
import re
def snake_to_camel(word):
return ''.join(x.capitalize() or '_' for x in word.split('_'))
|
[
"assert snake_to_camel('android_tv') == 'AndroidTv'",
"assert snake_to_camel('google_pixel') == 'GooglePixel'",
"assert snake_to_camel('apple_watch') == 'AppleWatch'"
] |
[] |
The bathroom is west of the garden. The hallway is east of the garden.
|
babilong_0k_qa4_sample_82
| 17
| 102
|
|
430
|
Write a function to find the directrix of a parabola.
|
def parabola_directrix(a, b, c):
directrix=((int)(c - ((b * b) + 1) * 4 * a ))
return directrix
|
[
"assert parabola_directrix(5,3,2)==-198",
"assert parabola_directrix(9,8,4)==-2336",
"assert parabola_directrix(2,4,6)==-130"
] |
[] |
The garden is east of the office. The bedroom is east of the garden.
|
babilong_0k_qa4_sample_32
| 17
| 102
|
|
119
|
Write a python function to find the element that appears only once in a sorted array.
|
def search(arr,n) :
XOR = 0
for i in range(n) :
XOR = XOR ^ arr[i]
return (XOR)
|
[
"assert search([1,1,2,2,3],5) == 3",
"assert search([1,1,3,3,4,4,5,5,7,7,8],11) == 8",
"assert search([1,2,2,3,3,4,4],7) == 1"
] |
[] |
The hallway is south of the office. The bathroom is south of the hallway.
|
babilong_0k_qa4_sample_9
| 17
| 103
|
|
173
|
Write a function to remove everything except alphanumeric characters from a string.
|
import re
def remove_splchar(text):
pattern = re.compile('[\W_]+')
return (pattern.sub('', text))
|
[
"assert remove_splchar('python @#&^%$*program123')==('pythonprogram123')",
"assert remove_splchar('python %^$@!^&*() programming24%$^^() language')==('pythonprogramming24language')",
"assert remove_splchar('python ^%&^()(+_)(_^&67) program')==('python67program')"
] |
[] |
Sandra grabbed the milk. Sandra dropped the milk there. Sandra took the milk. Mary grabbed the apple. Sandra moved to the bedroom. Mary left the apple. Sandra discarded the milk. Sandra picked up the milk. Daniel went back to the garden. John went to the bathroom. Sandra left the milk. Sandra took the milk there. Mary journeyed to the bathroom. Sandra discarded the milk. Sandra grabbed the milk. Mary got the football. Daniel moved to the hallway. Daniel travelled to the bedroom. Mary put down the football. Mary took the football there. Mary travelled to the office. John journeyed to the office. John travelled to the hallway. John moved to the office. Sandra put down the milk. Mary discarded the football. John travelled to the hallway. Mary journeyed to the garden. Daniel got the milk. Sandra went to the office. Daniel went to the kitchen. Daniel went back to the garden. Mary journeyed to the hallway. Daniel travelled to the office. Sandra took the football there. Mary went back to the office. Sandra went to the bathroom. Daniel moved to the bathroom. Sandra left the football. Daniel grabbed the football. John went back to the garden. Sandra went back to the office. Mary moved to the bathroom. Daniel discarded the milk there. Daniel put down the football. Mary picked up the milk. Mary went to the office. John moved to the bedroom. Sandra journeyed to the garden. Sandra moved to the kitchen. Daniel took the football there. Mary went to the bedroom. Daniel left the football. John went to the office. Mary dropped the milk. Daniel grabbed the football. Sandra moved to the bedroom. Mary journeyed to the kitchen. Daniel travelled to the garden. Mary went back to the bedroom. Mary moved to the garden. Sandra went back to the garden. Sandra travelled to the hallway. Sandra travelled to the garden. Daniel discarded the football. Mary grabbed the football. Mary went back to the bedroom. Mary put down the football there. Mary moved to the kitchen. John went back to the kitchen. Mary got the apple there. Daniel moved to the hallway. Mary went to the garden. Daniel went back to the office. Mary dropped the apple. John moved to the garden. Sandra grabbed the apple there. Sandra moved to the bedroom. Sandra grabbed the milk. Sandra went to the bathroom.
|
babilong_0k_qa3_sample_75
| 479
| 103
|
|
46
|
Write a python function to determine whether all the numbers are different from each other are not.
|
def test_distinct(data):
if len(data) == len(set(data)):
return True
else:
return False;
|
[
"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"
] |
[] |
Mary went back to the hallway. Daniel went to the hallway. John travelled to the bathroom. Mary moved to the kitchen. Sandra journeyed to the kitchen. Mary journeyed to the garden. Daniel went back to the bedroom. John went back to the hallway.
|
babilong_0k_qa1_sample_25
| 54
| 104
|
|
161
|
Write a function to remove all elements from a given list present in another list.
|
def remove_elements(list1, list2):
result = [x for x in list1 if x not in list2]
return result
|
[
"assert remove_elements([1,2,3,4,5,6,7,8,9,10],[2,4,6,8])==[1, 3, 5, 7, 9, 10]",
"assert remove_elements([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],[1, 3, 5, 7])==[2, 4, 6, 8, 9, 10]",
"assert remove_elements([1, 2, 3, 4, 5, 6, 7, 8, 9, 10],[5,7])==[1, 2, 3, 4, 6, 8, 9, 10]"
] |
[] |
Mary grabbed the apple there. Jeff went back to the bedroom. Bill went to the office. Mary moved to the office. Mary gave the apple to Bill. Mary journeyed to the hallway.
|
babilong_0k_qa5_sample_43
| 40
| 104
|
|
284
|
Write a function to check whether all items of a list are equal to a given string.
|
def check_element(list,element):
check_element=all(v== element for v in list)
return check_element
|
[
"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"
] |
[] |
Sandra grabbed the football there. Sandra discarded the football. Daniel travelled to the office. Sandra grabbed the football there. Mary travelled to the kitchen. Sandra went to the bathroom. Sandra dropped the football. Sandra took the football there. Daniel journeyed to the kitchen. Sandra discarded the football. Sandra picked up the football there. Daniel went to the hallway. John travelled to the kitchen. Sandra left the football. Mary went to the office. Sandra picked up the football there. Mary went back to the bedroom. John travelled to the bathroom. Mary grabbed the milk there. John went back to the hallway. Daniel travelled to the kitchen. John travelled to the office. Mary discarded the milk. Sandra journeyed to the bedroom.
|
babilong_0k_qa2_sample_45
| 147
| 104
|
|
410
|
Write a function to find the minimum value in a given heterogeneous list.
|
def min_val(listval):
min_val = min(i for i in listval if isinstance(i, int))
return min_val
|
[
"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"
] |
[] |
Daniel went to the hallway. John got the apple. John left the apple. John grabbed the apple there. Sandra journeyed to the office. John went to the hallway. Mary moved to the kitchen. Sandra moved to the bathroom. Mary took the milk there. Sandra moved to the hallway. Mary dropped the milk. Daniel journeyed to the office. Daniel journeyed to the bathroom. John discarded the apple. Mary grabbed the milk. Mary discarded the milk. John grabbed the apple. John left the apple. Daniel moved to the hallway. Daniel took the apple. Daniel journeyed to the bathroom. John went back to the garden. Daniel dropped the apple. Daniel took the apple. Daniel put down the apple. Mary got the milk. Daniel took the apple. Sandra moved to the kitchen. Daniel discarded the apple. Daniel took the apple. Mary discarded the milk there. Sandra took the milk. Daniel journeyed to the hallway. Daniel discarded the apple. John went back to the hallway. Sandra went back to the hallway. John went back to the garden. Daniel took the apple there. Sandra left the milk. Daniel put down the apple. Daniel got the milk. John went back to the bathroom. Daniel discarded the milk. Daniel travelled to the kitchen. Daniel went to the hallway. Mary travelled to the office. Sandra took the apple. Sandra left the apple. Daniel travelled to the garden. Daniel went to the bathroom. Sandra moved to the office. Mary went back to the kitchen. Sandra journeyed to the bathroom. John moved to the kitchen. Mary moved to the hallway. Sandra moved to the bedroom. Mary went back to the kitchen. John moved to the hallway. Sandra went to the office. John moved to the bathroom. Mary went back to the bathroom. Sandra moved to the bedroom. Daniel went back to the kitchen. Mary went to the garden. Mary went to the office. Daniel went to the bathroom. John journeyed to the office. John journeyed to the bathroom. Daniel went back to the kitchen. Mary travelled to the kitchen. Mary went to the office. Sandra took the football. John went to the hallway. John moved to the garden. Sandra moved to the bathroom. Sandra dropped the football. Mary journeyed to the hallway. Daniel travelled to the office. Sandra went to the garden. Mary travelled to the kitchen. Daniel moved to the hallway. Daniel picked up the milk. Daniel grabbed the apple there. John went back to the office. John travelled to the bedroom. John went to the bathroom. Mary went to the garden. Daniel dropped the apple. John picked up the football. Mary moved to the office. Daniel dropped the milk. Daniel took the milk. John left the football there. Sandra travelled to the office. Daniel picked up the apple there. Sandra moved to the hallway. Mary went back to the garden. Sandra moved to the bathroom. Mary travelled to the hallway. John went back to the garden. Daniel moved to the office. Mary went back to the kitchen. John travelled to the bedroom. John moved to the kitchen. Sandra got the football. Sandra put down the football. Sandra took the football there. Mary moved to the bedroom. John moved to the bathroom. Sandra discarded the football. John picked up the football there. Daniel discarded the apple. Sandra went back to the office. John travelled to the bedroom. Daniel went to the bathroom. Daniel put down the milk.
|
babilong_0k_qa3_sample_7
| 693
| 104
|
|
488
|
Write a function to find the area of a pentagon.
|
import math
def area_pentagon(a):
area=(math.sqrt(5*(5+2*math.sqrt(5)))*pow(a,2))/4.0
return area
|
[
"assert area_pentagon(5)==43.01193501472417",
"assert area_pentagon(10)==172.0477400588967",
"assert area_pentagon(15)==387.10741513251753"
] |
[] |
Sandra journeyed to the bedroom. Mary journeyed to the garden. Sandra moved to the hallway. Mary travelled to the office. Mary travelled to the kitchen. Mary journeyed to the garden. John moved to the hallway. Mary went to the bedroom. John moved to the bathroom. Mary went to the bathroom.
|
babilong_0k_qa1_sample_12
| 65
| 104
|
|
88
|
Write a function to get the frequency of the elements in a list.
|
import collections
def freq_count(list1):
freq_count= collections.Counter(list1)
return freq_count
|
[
"assert freq_count([10,10,10,10,20,20,20,20,40,40,50,50,30])==({10: 4, 20: 4, 40: 2, 50: 2, 30: 1}) ",
"assert freq_count([1,2,3,4,3,2,4,1,3,1,4])==({1:3, 2:2,3:3,4:3}) ",
"assert freq_count([5,6,7,4,9,10,4,5,6,7,9,5])==({10:1,5:3,6:2,7:2,4:2,9:2}) "
] |
[] |
Mary picked up the milk there. Mary put down the milk. Mary grabbed the apple there. Bill moved to the hallway. Fred went back to the bathroom. Jeff travelled to the hallway. Mary handed the apple to Fred. Fred handed the apple to Mary.
|
babilong_0k_qa5_sample_87
| 53
| 105
|
|
168
|
Write a python function to find the frequency of a number in a given array.
|
def frequency(a,x):
count = 0
for i in a:
if i == x: count += 1
return count
|
[
"assert frequency([1,2,3],4) == 0",
"assert frequency([1,2,2,3,3,3,4],3) == 3",
"assert frequency([0,1,2,3,1,2],1) == 2"
] |
[] |
Mary journeyed to the office. Mary journeyed to the bedroom. Sandra went to the garden. Sandra moved to the kitchen. Sandra went to the bathroom. Daniel moved to the office. John went back to the office. John went to the garden.
|
babilong_0k_qa1_sample_39
| 52
| 105
|
|
163
|
Write a function to calculate the area of a regular polygon.
|
from math import tan, pi
def area_polygon(s,l):
area = s * (l ** 2) / (4 * tan(pi / s))
return area
|
[
"assert area_polygon(4,20)==400.00000000000006",
"assert area_polygon(10,15)==1731.1969896610804",
"assert area_polygon(9,7)==302.90938549487214"
] |
[] |
The office is west of the garden. The kitchen is west of the office.
|
babilong_0k_qa4_sample_46
| 17
| 106
|
|
205
|
Write a function to find the inversions of tuple elements in the given tuple list.
|
def inversion_elements(test_tup):
res = tuple(list(map(lambda x: ~x, list(test_tup))))
return (res)
|
[
"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)"
] |
[] |
The bathroom is east of the office. The garden is west of the office.
|
babilong_0k_qa4_sample_15
| 17
| 106
|
|
294
|
Write a function to find the maximum value in a given heterogeneous list.
|
def max_val(listval):
max_val = max(i for i in listval if isinstance(i, int))
return(max_val)
|
[
"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"
] |
[] |
Bill went back to the office. Jeff went to the bedroom. Jeff took the apple there. Jeff picked up the milk there. Jeff went back to the garden. Jeff journeyed to the bathroom. Jeff discarded the apple. Jeff got the football there. Fred went to the hallway. Jeff picked up the apple there. Jeff put down the apple. Jeff grabbed the apple there. Mary moved to the office. Jeff went back to the garden. Jeff journeyed to the bedroom. Bill travelled to the bedroom. Jeff passed the apple to Bill. Bill gave the apple to Jeff. Jeff handed the apple to Bill. Bill passed the apple to Jeff. Jeff gave the apple to Bill. Bill dropped the apple. Jeff gave the football to Bill. Mary went to the hallway.
|
babilong_0k_qa5_sample_71
| 156
| 106
|
|
470
|
Write a function to find the pairwise addition of the elements of the given tuples.
|
def add_pairwise(test_tup):
res = tuple(i + j for i, j in zip(test_tup, test_tup[1:]))
return (res)
|
[
"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)"
] |
[] |
John picked up the football there. Sandra went back to the kitchen. John travelled to the bathroom. John moved to the kitchen.
|
babilong_0k_qa3_sample_17
| 27
| 106
|
|
120
|
Write a function to find the maximum product from the pairs of tuples within a given list.
|
def max_product_tuple(list1):
result_max = max([abs(x * y) for x, y in list1] )
return result_max
|
[
"assert max_product_tuple([(2, 7), (2, 6), (1, 8), (4, 9)] )==36",
"assert max_product_tuple([(10,20), (15,2), (5,10)] )==200",
"assert max_product_tuple([(11,44), (10,15), (20,5), (12, 9)] )==484"
] |
[] |
Mary grabbed the milk there. John picked up the apple there. Mary went to the bathroom. Daniel moved to the garden. John put down the apple. Mary left the milk. John went to the bathroom. Daniel went back to the kitchen. Mary picked up the milk there. Sandra moved to the bedroom. Mary left the milk. Mary went back to the bedroom.
|
babilong_0k_qa2_sample_39
| 75
| 107
|
|
209
|
Write a function to delete the smallest element from the given heap and then insert a new item.
|
import heapq as hq
def heap_replace(heap,a):
hq.heapify(heap)
hq.heapreplace(heap, a)
return heap
|
[
"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]"
] |
[] |
Bill grabbed the apple there. Jeff went back to the kitchen. Fred went to the garden. Bill dropped the apple. Jeff went to the garden. Bill moved to the bathroom. Bill journeyed to the office. Fred travelled to the hallway. Bill went to the hallway. Fred travelled to the kitchen. Jeff journeyed to the hallway. Jeff went back to the office. Fred moved to the hallway. Bill travelled to the office. Jeff grabbed the apple there. Jeff went back to the kitchen. Mary went back to the hallway. Jeff went back to the hallway. Jeff passed the apple to Mary. Mary gave the apple to Fred. Fred handed the apple to Mary. Fred moved to the bathroom. Mary dropped the apple. Mary took the apple there. Mary handed the apple to Jeff. Bill travelled to the hallway.
|
babilong_0k_qa5_sample_5
| 166
| 107
|
|
336
|
Write a function to check whether the given month name contains 28 days or not.
|
def check_monthnum(monthname1):
if monthname1 == "February":
return True
else:
return False
|
[
"assert check_monthnum(\"February\")==True",
"assert check_monthnum(\"January\")==False",
"assert check_monthnum(\"March\")==False"
] |
[] |
John travelled to the garden. Mary moved to the kitchen. Daniel went back to the hallway. Daniel picked up the apple there. Mary went to the office. Daniel discarded the apple. Daniel grabbed the apple. Sandra travelled to the bathroom. Daniel travelled to the garden. Mary went back to the kitchen. Mary grabbed the football. Sandra journeyed to the kitchen. Mary dropped the football. Daniel moved to the office. Mary moved to the office. Sandra took the football. John journeyed to the bathroom. Daniel journeyed to the hallway. Sandra journeyed to the office. Sandra left the football. Sandra got the football. John moved to the bedroom. Daniel put down the apple. Daniel grabbed the apple. Daniel put down the apple there. Mary travelled to the bedroom. Sandra went back to the hallway. Sandra went back to the garden. Sandra travelled to the bedroom. Sandra put down the football.
|
babilong_0k_qa3_sample_37
| 183
| 107
|
|
345
|
Write a function to find the difference between two consecutive numbers in a given list.
|
def diff_consecutivenums(nums):
result = [b-a for a, b in zip(nums[:-1], nums[1:])]
return result
|
[
"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]"
] |
[] |
Daniel went back to the office. Sandra moved to the bathroom.
|
babilong_0k_qa1_sample_66
| 14
| 107
|
|
409
|
Write a function to find the minimum product from the pairs of tuples within a given list.
|
def min_product_tuple(list1):
result_min = min([abs(x * y) for x, y in list1] )
return result_min
|
[
"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"
] |
[] |
Daniel journeyed to the bathroom. Daniel got the football. Sandra travelled to the kitchen. Mary travelled to the hallway. Mary went back to the bedroom. Mary moved to the office. Sandra travelled to the office. Daniel put down the football. Sandra went to the kitchen. Mary journeyed to the bedroom. Mary travelled to the bathroom. John moved to the kitchen. Daniel got the milk. Daniel picked up the football. Sandra moved to the office. Sandra went back to the bedroom. Sandra picked up the apple. Daniel travelled to the kitchen. Sandra discarded the apple. Mary moved to the kitchen. Sandra went to the office. Mary journeyed to the hallway. John moved to the garden. Mary went to the garden. Daniel left the football. Daniel picked up the football. John went back to the kitchen. Mary went back to the office. Daniel dropped the football. Daniel discarded the milk there. Sandra went to the hallway. Sandra travelled to the office. Mary went to the garden. Sandra journeyed to the garden. Mary moved to the hallway. Mary journeyed to the kitchen. John travelled to the office. John journeyed to the kitchen. Mary moved to the bathroom. Daniel went to the garden. Sandra travelled to the kitchen. Daniel travelled to the hallway. Sandra journeyed to the bathroom. Sandra travelled to the bedroom. John travelled to the office. Daniel journeyed to the office. Sandra took the apple. Mary went to the garden. John went back to the kitchen. Sandra dropped the apple. Mary travelled to the bathroom. Mary went back to the kitchen. Mary picked up the milk. Sandra travelled to the bathroom. Mary left the milk. John went to the bedroom. John got the apple. John put down the apple. John picked up the apple. John discarded the apple. John took the apple. John moved to the office. John left the apple. John took the apple. Mary journeyed to the bedroom. Daniel travelled to the bathroom. Daniel went to the bedroom. John left the apple. John got the apple. Sandra went back to the office. John put down the apple. John went to the bedroom. Daniel journeyed to the office. Daniel travelled to the hallway. Daniel journeyed to the garden. Mary moved to the bathroom. Daniel went to the kitchen. Daniel went back to the hallway. John travelled to the hallway. Mary journeyed to the hallway. Mary went back to the bedroom. Mary moved to the hallway. John went back to the garden. Mary went to the office. Mary grabbed the apple. Mary went back to the bathroom. Sandra went to the bedroom. Daniel went to the garden. Sandra moved to the hallway. Mary discarded the apple. Sandra went back to the bedroom. John travelled to the bedroom. Mary journeyed to the garden. Daniel journeyed to the hallway. Mary went back to the bedroom. Mary went to the office. John moved to the garden. Daniel travelled to the kitchen. John went to the hallway. John journeyed to the kitchen. Sandra moved to the bathroom. Sandra took the apple. Daniel went to the hallway. Mary journeyed to the hallway. John got the football. Mary went back to the bathroom. John grabbed the milk. John went back to the office. John dropped the football. Sandra put down the apple. Mary went to the garden. John discarded the milk. John moved to the garden. Daniel went back to the kitchen. Sandra picked up the apple. Sandra dropped the apple. Mary went to the office. Sandra travelled to the kitchen. Daniel went to the garden. Sandra moved to the office. Sandra took the football. John travelled to the bedroom. John moved to the office. Sandra dropped the football. Sandra travelled to the bedroom. Mary grabbed the milk. John picked up the football. Mary journeyed to the bedroom. Mary travelled to the garden. Daniel travelled to the bathroom. Daniel travelled to the hallway. Daniel went back to the garden. John dropped the football. Mary left the milk. Mary journeyed to the bathroom. Sandra went to the office. Mary journeyed to the hallway. John picked up the football.
|
babilong_0k_qa3_sample_74
| 837
| 107
|
|
503
|
Write a function to add consecutive numbers of a given list.
|
def add_consecutive_nums(nums):
result = [b+a for a, b in zip(nums[:-1], nums[1:])]
return result
|
[
"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]"
] |
[] |
John went back to the office. Daniel journeyed to the garden. Mary took the apple there. John went back to the hallway. Mary grabbed the milk there. Daniel moved to the bedroom. Mary dropped the apple there. Sandra grabbed the football there. Mary travelled to the garden. Mary went back to the hallway. Sandra went back to the kitchen. Sandra went back to the hallway. Sandra put down the football. Sandra went to the garden.
|
babilong_0k_qa2_sample_41
| 91
| 107
|
|
363
|
Write a function to add the k elements to each element in the tuple.
|
def add_K_element(test_list, K):
res = [tuple(j + K for j in sub ) for sub in test_list]
return (res)
|
[
"assert add_K_element([(1, 3, 4), (2, 4, 6), (3, 8, 1)], 4) == [(5, 7, 8), (6, 8, 10), (7, 12, 5)]",
"assert add_K_element([(1, 2, 3), (4, 5, 6), (7, 8, 9)], 8) == [(9, 10, 11), (12, 13, 14), (15, 16, 17)]",
"assert add_K_element([(11, 12, 13), (14, 15, 16), (17, 18, 19)], 9) == [(20, 21, 22), (23, 24, 25), (26, 27, 28)]"
] |
[] |
The garden is west of the office. The office is west of the kitchen.
|
babilong_0k_qa4_sample_48
| 17
| 108
|
|
277
|
Write a function to filter a dictionary based on values.
|
def dict_filter(dict,n):
result = {key:value for (key, value) in dict.items() if value >=n}
return result
|
[
"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}"
] |
[] |
Daniel went to the office. John went back to the bedroom. Mary moved to the bathroom. John went back to the bathroom. Sandra went to the bathroom. Mary went back to the hallway. Mary went to the office. Daniel journeyed to the bedroom. Sandra went back to the office. John travelled to the office. Mary journeyed to the bathroom. John went to the kitchen. Daniel picked up the apple there. Mary went to the hallway. Daniel moved to the hallway. Daniel left the apple. Daniel journeyed to the bedroom. Mary got the apple. Sandra travelled to the garden. Mary put down the apple. Sandra travelled to the bedroom. Sandra went back to the garden. Daniel journeyed to the kitchen. Sandra got the football. John went back to the office. Daniel travelled to the office. Mary went to the garden. Mary travelled to the bedroom. Sandra moved to the bathroom. Sandra dropped the football. Mary grabbed the milk. Mary travelled to the hallway. Daniel journeyed to the kitchen. Sandra picked up the football. Mary put down the milk. Daniel went back to the office. Mary grabbed the milk. Daniel went back to the garden. Sandra went back to the garden. Mary got the apple. Sandra went to the kitchen. Mary dropped the apple. Mary put down the milk. Mary journeyed to the kitchen. Daniel went to the hallway. Sandra put down the football there. John travelled to the bathroom. Mary travelled to the garden.
|
babilong_0k_qa3_sample_55
| 298
| 109
|
|
365
|
Write a python function to count the number of digits of a given number.
|
def count_Digit(n):
count = 0
while n != 0:
n //= 10
count += 1
return count
|
[
"assert count_Digit(12345) == 5",
"assert count_Digit(11223305) == 8",
"assert count_Digit(4123459) == 7"
] |
[] |
Mary got the milk there. Mary gave the milk to Bill. Jeff went to the hallway. Bill gave the milk to Mary. Fred moved to the hallway. Mary handed the milk to Fred.
|
babilong_0k_qa5_sample_39
| 40
| 109
|
|
400
|
Write a function to extract the frequency of unique tuples in the given list order irrespective.
|
def extract_freq(test_list):
res = len(list(set(tuple(sorted(sub)) for sub in test_list)))
return (res)
|
[
"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)] ) == 4"
] |
[] |
John moved to the hallway. John journeyed to the kitchen. Sandra travelled to the garden. John journeyed to the garden. Daniel journeyed to the office. John went to the kitchen.
|
babilong_0k_qa1_sample_3
| 40
| 109
|
|
494
|
Write a function to convert the given binary tuple to integer.
|
def binary_to_integer(test_tup):
res = int("".join(str(ele) for ele in test_tup), 2)
return (str(res))
|
[
"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'"
] |
[] |
The garden is north of the hallway. The hallway is north of the bathroom.
|
babilong_0k_qa4_sample_68
| 17
| 109
|
|
138
|
Write a python function to check whether the given number can be represented as sum of non-zero powers of 2 or not.
|
def is_Sum_Of_Powers_Of_Two(n):
if (n % 2 == 1):
return False
else:
return True
|
[
"assert is_Sum_Of_Powers_Of_Two(10) == True",
"assert is_Sum_Of_Powers_Of_Two(7) == False",
"assert is_Sum_Of_Powers_Of_Two(14) == True"
] |
[] |
The hallway is east of the bathroom. The garden is west of the bathroom.
|
babilong_0k_qa4_sample_14
| 17
| 110
|
|
63
|
Write a function to find the maximum difference between available pairs in the given tuple list.
|
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res)
|
[
"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"
] |
[] |
Sandra went to the bedroom. Sandra travelled to the office. Daniel went back to the garden. Mary travelled to the bedroom. John journeyed to the garden. Daniel went back to the hallway. Mary went back to the garden. Mary journeyed to the bedroom. Sandra went back to the kitchen. Sandra went to the garden.
|
babilong_0k_qa1_sample_81
| 68
| 111
|
|
91
|
Write a function to check if a substring is present in a given list of string values.
|
def find_substring(str1, sub_str):
if any(sub_str in s for s in str1):
return True
return False
|
[
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ack\")==True",
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"abc\")==False",
"assert find_substring([\"red\", \"black\", \"white\", \"green\", \"orange\"],\"ange\")==True"
] |
[] |
Mary journeyed to the bedroom. Mary went to the office. Sandra journeyed to the bathroom. Daniel journeyed to the bedroom. John travelled to the garden. Daniel journeyed to the kitchen. Daniel went to the office. Daniel moved to the kitchen. Sandra travelled to the bedroom. Sandra journeyed to the kitchen. John went back to the office. John moved to the bathroom. Sandra went back to the garden. Daniel took the apple. Sandra travelled to the office. John travelled to the bedroom. John travelled to the kitchen. Daniel discarded the apple. Sandra went to the garden. Mary went to the bedroom. Daniel grabbed the apple. John went to the bedroom. John went back to the hallway. Daniel went to the bedroom. John travelled to the office. Daniel travelled to the kitchen. Daniel dropped the apple. John moved to the garden.
|
babilong_0k_qa3_sample_24
| 173
| 111
|
|
156
|
Write a function to convert a tuple of string values to a tuple of integer values.
|
def tuple_int_str(tuple_str):
result = tuple((int(x[0]), int(x[1])) for x in tuple_str)
return result
|
[
"assert tuple_int_str((('333', '33'), ('1416', '55')))==((333, 33), (1416, 55))",
"assert tuple_int_str((('999', '99'), ('1000', '500')))==((999, 99), (1000, 500))",
"assert tuple_int_str((('666', '66'), ('1500', '555')))==((666, 66), (1500, 555))"
] |
[] |
Sandra went back to the office. John moved to the bathroom. Sandra journeyed to the bedroom. Mary journeyed to the bathroom. John journeyed to the bedroom. Daniel moved to the office. Mary went to the garden. Daniel moved to the garden. Daniel travelled to the hallway. Mary journeyed to the kitchen.
|
babilong_0k_qa1_sample_82
| 67
| 111
|
|
281
|
Write a python function to check if the elements of a given list are unique or not.
|
def all_unique(test_list):
if len(test_list) > len(set(test_list)):
return False
return True
|
[
"assert all_unique([1,2,3]) == True",
"assert all_unique([1,2,1,2]) == False",
"assert all_unique([1,2,3,4,5]) == True"
] |
[] |
The hallway is east of the bathroom. The bedroom is west of the bathroom.
|
babilong_0k_qa4_sample_0
| 17
| 111
|
|
21
|
Write a function to find m number of multiples of n.
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
[
"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]"
] |
[] |
The bedroom is east of the bathroom. The office is west of the bathroom.
|
babilong_0k_qa4_sample_84
| 17
| 112
|
|
153
|
Write a function to find the vertex of a parabola.
|
def parabola_vertex(a, b, c):
vertex=(((-b / (2 * a)),(((4 * a * c) - (b * b)) / (4 * a))))
return vertex
|
[
"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)"
] |
[] |
The bedroom is north of the office. The office is north of the bathroom.
|
babilong_0k_qa4_sample_76
| 17
| 112
|
|
244
|
Write a python function to find the next perfect square greater than a given number.
|
import math
def next_Perfect_Square(N):
nextN = math.floor(math.sqrt(N)) + 1
return nextN * nextN
|
[
"assert next_Perfect_Square(35) == 36",
"assert next_Perfect_Square(6) == 9",
"assert next_Perfect_Square(9) == 16"
] |
[] |
John moved to the kitchen. Sandra travelled to the garden. Sandra went back to the bathroom. Sandra went back to the bedroom. Sandra journeyed to the office. Sandra travelled to the hallway. Daniel went back to the hallway. Daniel went to the garden.
|
babilong_0k_qa1_sample_56
| 53
| 112
|
|
260
|
Write a function to find the nth newman–shanks–williams prime number.
|
def newman_prime(n):
if n == 0 or n == 1:
return 1
return 2 * newman_prime(n - 1) + newman_prime(n - 2)
|
[
"assert newman_prime(3) == 7 ",
"assert newman_prime(4) == 17",
"assert newman_prime(5) == 41"
] |
[] |
Mary travelled to the hallway. Bill went back to the garden. Fred moved to the bedroom. Fred got the football there. Fred dropped the football. Fred went to the garden. Mary journeyed to the kitchen. Bill went to the office. Mary went back to the office. Bill journeyed to the bedroom. Mary went back to the bedroom. Jeff grabbed the milk there. Jeff went to the office. Jeff went to the bathroom. Mary got the football there. Mary put down the football there. Bill journeyed to the garden. Fred went back to the bathroom. Jeff put down the milk. Bill moved to the office. Fred went to the office. Mary grabbed the football there. Jeff travelled to the office. Mary dropped the football. Fred moved to the kitchen. Bill journeyed to the kitchen. Bill took the apple there. Bill went back to the hallway. Fred moved to the office. Mary picked up the football there. Fred journeyed to the bedroom. Mary gave the football to Fred. Jeff went to the garden. Bill travelled to the garden. Fred dropped the football there. Mary journeyed to the kitchen.
|
babilong_0k_qa5_sample_79
| 229
| 112
|
|
370
|
Write a function to sort a tuple by its float element.
|
def float_sort(price):
float_sort=sorted(price, key=lambda x: float(x[1]), reverse=True)
return float_sort
|
[
"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')] "
] |
[] |
Jeff took the football there. Jeff passed the football to Fred. Jeff got the milk there. Bill travelled to the bedroom.
|
babilong_0k_qa5_sample_55
| 26
| 112
|
|
420
|
Write a python function to find the cube sum of first n even natural numbers.
|
def cube_Sum(n):
sum = 0
for i in range(1,n + 1):
sum += (2*i)*(2*i)*(2*i)
return sum
|
[
"assert cube_Sum(2) == 72",
"assert cube_Sum(3) == 288",
"assert cube_Sum(4) == 800"
] |
[] |
Mary travelled to the bedroom. Daniel journeyed to the office. Sandra got the apple there. Sandra travelled to the bathroom. Sandra dropped the apple. Mary grabbed the football there.
|
babilong_0k_qa2_sample_69
| 37
| 112
|
|
427
|
Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format by using regex.
|
import re
def change_date_format(dt):
return re.sub(r'(\d{4})-(\d{1,2})-(\d{1,2})', '\\3-\\2-\\1', dt)
|
[
"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'"
] |
[] |
Daniel grabbed the football there. Sandra picked up the apple there. Daniel dropped the football. Sandra discarded the apple. John got the football there. Sandra got the apple there. John went to the bathroom. Mary journeyed to the garden. Sandra dropped the apple. Daniel went back to the bedroom. Sandra got the apple there. Daniel travelled to the garden. Daniel moved to the bedroom. John dropped the football. Sandra left the apple. John grabbed the football there. Daniel got the apple there. John left the football.
|
babilong_0k_qa2_sample_40
| 106
| 112
|
|
184
|
Write a function to find all the values in a list that are greater than a specified number.
|
def greater_specificnum(list,num):
greater_specificnum=all(x >= num for x in list)
return greater_specificnum
|
[
"assert greater_specificnum([220, 330, 500],200)==True",
"assert greater_specificnum([12, 17, 21],20)==False",
"assert greater_specificnum([1,2,3,4],10)==False"
] |
[] |
Mary moved to the garden. Mary took the milk there. Sandra went to the bedroom. Sandra went to the kitchen. John journeyed to the bathroom. Daniel went back to the kitchen. Sandra took the apple there. Sandra dropped the apple there. Sandra took the apple there. Sandra took the football there. Mary went back to the hallway. Sandra put down the football. Mary discarded the milk. Mary picked up the milk there. Mary put down the milk. Sandra got the football there.
|
babilong_0k_qa2_sample_52
| 100
| 113
|
|
504
|
Write a python function to find the cube sum of first n natural numbers.
|
def sum_Of_Series(n):
sum = 0
for i in range(1,n + 1):
sum += i * i*i
return sum
|
[
"assert sum_Of_Series(5) == 225",
"assert sum_Of_Series(2) == 9",
"assert sum_Of_Series(3) == 36"
] |
[] |
The bedroom is west of the office. The bathroom is west of the bedroom.
|
babilong_0k_qa4_sample_7
| 17
| 113
|
|
19
|
Write a function to find whether a given array of integers contains any duplicate element.
|
def test_duplicate(arraynums):
nums_set = set(arraynums)
return len(arraynums) != len(nums_set)
|
[
"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])==True"
] |
[] |
John went back to the hallway. Mary picked up the apple. Sandra journeyed to the bedroom. Sandra grabbed the milk. Daniel moved to the office. Sandra went to the office. Mary discarded the apple. Daniel went back to the kitchen. Sandra put down the milk. Sandra went back to the bedroom. Mary went back to the bathroom. Sandra grabbed the football there. Mary went to the garden. Daniel picked up the apple. Mary travelled to the office. Mary picked up the milk. Sandra went back to the office. Mary journeyed to the kitchen. John travelled to the office. Mary went to the garden.
|
babilong_0k_qa3_sample_9
| 126
| 114
|
|
53
|
Write a python function to check whether the first and last characters of a given string are equal or not.
|
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal")
|
[
"assert check_Equality(\"abcda\") == \"Equal\"",
"assert check_Equality(\"ab\") == \"Not Equal\"",
"assert check_Equality(\"mad\") == \"Not Equal\""
] |
[] |
John went to the office. Mary travelled to the garden. Daniel journeyed to the kitchen. Mary went back to the bedroom. Mary travelled to the office. John travelled to the bathroom. Mary went to the bathroom. John travelled to the kitchen. John went back to the bathroom. John went back to the bedroom.
|
babilong_0k_qa1_sample_19
| 65
| 114
|
|
185
|
Write a function to find the focus of a parabola.
|
def parabola_focus(a, b, c):
focus= (((-b / (2 * a)),(((4 * a * c) - (b * b) + 1) / (4 * a))))
return focus
|
[
"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)"
] |
[] |
Sandra went back to the bedroom. Mary journeyed to the garden. John journeyed to the kitchen. Sandra went to the office. John moved to the hallway. Sandra went back to the garden. John went back to the kitchen. Daniel journeyed to the bedroom.
|
babilong_0k_qa1_sample_65
| 56
| 114
|
|
206
|
Write a function to perform the adjacent element concatenation in the given tuples.
|
def concatenate_elements(test_tup):
res = tuple(i + j for i, j in zip(test_tup, test_tup[1:]))
return (res)
|
[
"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')"
] |
[] |
Mary moved to the kitchen. Bill grabbed the football there. Jeff journeyed to the garden. Bill handed the football to Mary. Mary moved to the bathroom. Jeff went back to the office. Mary handed the football to Fred. Fred handed the football to Mary. Mary passed the football to Fred. Mary went back to the hallway. Fred discarded the football. Mary got the milk there.
|
babilong_0k_qa5_sample_41
| 79
| 114
|
|
497
|
Write a function to find the surface area of a cone.
|
import math
def surfacearea_cone(r,h):
l = math.sqrt(r * r + h * h)
SA = math.pi * r * (r + l)
return SA
|
[
"assert surfacearea_cone(5,12)==282.7433388230814",
"assert surfacearea_cone(10,15)==880.5179353159282",
"assert surfacearea_cone(19,17)==2655.923961165254"
] |
[] |
The office is north of the bedroom. The bedroom is north of the hallway.
|
babilong_0k_qa4_sample_5
| 17
| 114
|
|
224
|
Write a python function to count set bits of a given number.
|
def count_Set_Bits(n):
count = 0
while (n):
count += n & 1
n >>= 1
return count
|
[
"assert count_Set_Bits(2) == 1",
"assert count_Set_Bits(4) == 1",
"assert count_Set_Bits(6) == 2"
] |
[] |
Daniel journeyed to the hallway. John moved to the bathroom. Sandra picked up the apple there. John grabbed the milk there. John put down the milk there. Sandra moved to the bathroom. Sandra picked up the milk there. John journeyed to the office. Sandra journeyed to the hallway. Sandra discarded the milk.
|
babilong_0k_qa2_sample_53
| 66
| 115
|
|
298
|
Write a function to find the nested list elements which are present in another list.
|
def intersection_nested_lists(l1, l2):
result = [[n for n in lst if n in l1] for lst in l2]
return result
|
[
"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'], []]"
] |
[] |
Sandra went to the office. Sandra travelled to the bathroom.
|
babilong_0k_qa1_sample_7
| 14
| 115
|
|
102
|
Write a function to convert snake case string to camel case string.
|
def snake_to_camel(word):
import re
return ''.join(x.capitalize() or '_' for x in word.split('_'))
|
[
"assert snake_to_camel('python_program')=='PythonProgram'",
"assert snake_to_camel('python_language')==('PythonLanguage')",
"assert snake_to_camel('programming_language')==('ProgrammingLanguage')"
] |
[] |
Daniel grabbed the milk there. Daniel discarded the milk. John went back to the bedroom. Daniel moved to the kitchen. Mary travelled to the hallway. Daniel picked up the apple there. Sandra journeyed to the office. Sandra picked up the milk there. Sandra left the milk. John went back to the garden.
|
babilong_0k_qa2_sample_77
| 64
| 116
|
|
133
|
Write a function to calculate the sum of the negative numbers of a given list of numbers using lambda function.
|
def sum_negativenum(nums):
sum_negativenum = list(filter(lambda nums:nums<0,nums))
return sum(sum_negativenum)
|
[
"assert sum_negativenum([2, 4, -6, -9, 11, -12, 14, -5, 17])==-32",
"assert sum_negativenum([10,15,-14,13,-18,12,-20])==-52",
"assert sum_negativenum([19, -65, 57, 39, 152,-639, 121, 44, 90, -190])==-894"
] |
[] |
John got the apple. Mary travelled to the bedroom. Daniel picked up the milk. John discarded the apple. John grabbed the apple. John left the apple. Daniel travelled to the bedroom. Daniel travelled to the bathroom. Daniel went back to the garden. John went to the garden. Sandra got the football. Sandra put down the football. John travelled to the bathroom. Mary journeyed to the kitchen. Daniel put down the milk. John picked up the apple. John dropped the apple. Sandra went to the kitchen. Mary went back to the office. Daniel took the milk. John moved to the hallway. John took the football there. Mary went back to the hallway. John journeyed to the bedroom. Daniel dropped the milk. John put down the football. Daniel picked up the milk. John went back to the garden. Mary went back to the garden. John moved to the hallway. Mary travelled to the bedroom. Daniel journeyed to the bathroom. Daniel journeyed to the office. Daniel went to the hallway. Mary travelled to the bathroom. Daniel journeyed to the garden. Mary took the apple there. Mary went back to the office. John journeyed to the garden. Sandra journeyed to the bathroom. Mary journeyed to the kitchen. Daniel moved to the kitchen. Daniel went to the hallway. Sandra moved to the garden. Daniel dropped the milk there. Mary left the apple there. John moved to the kitchen. Daniel travelled to the bedroom.
|
babilong_0k_qa3_sample_91
| 295
| 116
|
|
151
|
Write a python function to check whether the given number is co-prime or not.
|
def gcd(p,q):
while q != 0:
p, q = q,p%q
return p
def is_coprime(x,y):
return gcd(x,y) == 1
|
[
"assert is_coprime(17,13) == True",
"assert is_coprime(15,21) == False",
"assert is_coprime(25,45) == False"
] |
[] |
Daniel journeyed to the bedroom. Sandra journeyed to the bathroom. John went to the office. Sandra moved to the bedroom.
|
babilong_0k_qa1_sample_98
| 27
| 116
|
|
258
|
Write a function to find number of odd elements in the given list using lambda function.
|
def count_odd(array_nums):
count_odd = len(list(filter(lambda x: (x%2 != 0) , array_nums)))
return count_odd
|
[
"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"
] |
[] |
John went to the hallway. Mary travelled to the bathroom. John took the football there. Mary travelled to the bedroom. Daniel got the apple there. Sandra went back to the hallway. Mary journeyed to the kitchen. Mary moved to the hallway. John moved to the bedroom. John left the football. Daniel travelled to the bathroom. John went to the office. John went back to the garden. John went to the hallway.
|
babilong_0k_qa2_sample_66
| 87
| 116
|
|
465
|
Write a function to drop empty items from a given dictionary.
|
def drop_empty(dict1):
dict1 = {key:value for (key, value) in dict1.items() if value is not None}
return dict1
|
[
"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'}"
] |
[] |
Mary went to the hallway. Fred picked up the football there. Fred picked up the apple there. Fred handed the apple to Bill. Bill journeyed to the bedroom. Jeff went back to the garden.
|
babilong_0k_qa5_sample_52
| 42
| 116
|
|
359
|
Write a python function to check whether one root of the quadratic equation is twice of the other or not.
|
def Check_Solution(a,b,c):
if (2*b*b == 9*a*c):
return ("Yes");
else:
return ("No");
|
[
"assert Check_Solution(1,3,2) == \"Yes\"",
"assert Check_Solution(1,2,3) == \"No\"",
"assert Check_Solution(1,-5,6) == \"No\""
] |
[] |
Sandra went to the bedroom. John went back to the hallway. Mary went to the hallway. Daniel journeyed to the kitchen. Mary went to the kitchen. Sandra got the apple. John grabbed the milk. Sandra discarded the apple. Mary went to the bedroom. Daniel travelled to the bathroom. Daniel grabbed the football. Mary went to the kitchen. John put down the milk. John went to the bedroom. John went back to the kitchen. Mary moved to the garden. Sandra went to the garden. John went back to the hallway. John travelled to the office. Mary journeyed to the office. Mary travelled to the bedroom. Mary travelled to the bathroom. Mary moved to the office. Sandra moved to the kitchen. Daniel went to the garden. John travelled to the hallway. Daniel put down the football. Daniel took the football. Mary went back to the kitchen. Daniel discarded the football. Mary went back to the bedroom. Daniel got the football. John picked up the milk there. Mary grabbed the apple. Mary moved to the office. Daniel discarded the football. Mary dropped the apple. Sandra went back to the garden. John travelled to the office. John grabbed the apple there. John left the milk. Daniel journeyed to the bathroom. Sandra grabbed the football. John got the milk. Mary moved to the garden. John moved to the hallway. John journeyed to the bedroom. Sandra moved to the kitchen. Sandra left the football. Mary went to the office. John put down the milk. Sandra moved to the bathroom. John went back to the office. Mary journeyed to the kitchen. Mary journeyed to the bedroom. Daniel travelled to the hallway. John discarded the apple. Daniel journeyed to the bathroom.
|
babilong_0k_qa3_sample_99
| 350
| 117
|
|
496
|
Write a function to find the smallest integers from a given list of numbers using heap queue algorithm.
|
import heapq as hq
def heap_queue_smallest(nums,n):
smallest_nums = hq.nsmallest(n, nums)
return smallest_nums
|
[
"assert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 25, 58],3)==[14, 22, 25] ",
"assert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 25, 58],2)==[14, 22]",
"assert heap_queue_smallest( [25, 35, 22, 85, 14, 65, 75, 22, 58],5)==[14, 22, 22, 25, 35]"
] |
[] |
Mary grabbed the football there. Daniel went to the garden. Daniel went to the hallway. Mary put down the football. John grabbed the apple. John went back to the bedroom. Sandra took the football. Daniel went back to the bathroom. John travelled to the hallway. Sandra dropped the football. John left the apple. John grabbed the apple. Mary took the football. Daniel travelled to the bedroom. John discarded the apple. John got the apple there. John journeyed to the kitchen. Mary discarded the football. Sandra went to the office. Mary picked up the football. John took the milk there. Mary discarded the football. Daniel went back to the hallway. John went to the bedroom. Daniel went to the bedroom. Mary travelled to the bathroom. Daniel got the football. John moved to the hallway. John went back to the bedroom. John discarded the milk. Mary moved to the hallway. Daniel went back to the hallway. John put down the apple. Daniel went back to the bedroom. John travelled to the bathroom. Sandra travelled to the hallway.
|
babilong_0k_qa3_sample_23
| 213
| 117
|
|
104
|
Write a function to sort each sublist of strings in a given list of lists using lambda function.
|
def sort_sublists(input_list):
result = [sorted(x, key = lambda x:x[0]) for x in input_list]
return result
|
[
"assert sort_sublists(([\"green\", \"orange\"], [\"black\", \"white\"], [\"white\", \"black\", \"orange\"]))==[['green', 'orange'], ['black', 'white'], ['black', 'orange', 'white']]",
"assert sort_sublists(([\" red \",\"green\" ],[\"blue \",\" black\"],[\" orange\",\"brown\"]))==[[' red ', 'green'], [' black', 'blue '], [' orange', 'brown']]",
"assert sort_sublists(([\"zilver\",\"gold\"], [\"magnesium\",\"aluminium\"], [\"steel\", \"bronze\"]))==[['gold', 'zilver'],['aluminium', 'magnesium'], ['bronze', 'steel']]"
] |
[] |
The garden is west of the bathroom. The office is west of the garden.
|
babilong_0k_qa4_sample_28
| 17
| 118
|
|
111
|
Write a function to find common elements in given nested lists. * list item * list item * list item * list item
|
def common_in_nested_lists(nestedlist):
result = list(set.intersection(*map(set, nestedlist)))
return result
|
[
"assert common_in_nested_lists([[12, 18, 23, 25, 45], [7, 12, 18, 24, 28], [1, 5, 8, 12, 15, 16, 18]])==[18, 12]",
"assert common_in_nested_lists([[12, 5, 23, 25, 45], [7, 11, 5, 23, 28], [1, 5, 8, 18, 23, 16]])==[5,23]",
"assert common_in_nested_lists([[2, 3,4, 1], [4, 5], [6,4, 8],[4, 5], [6, 8,4]])==[4]"
] |
[] |
Fred travelled to the garden. Bill went to the hallway. Mary picked up the milk there. Mary handed the milk to Bill.
|
babilong_0k_qa5_sample_94
| 27
| 118
|
|
66
|
Write a python function to count positive numbers in a list.
|
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count
|
[
"assert pos_count([1,-2,3,-4]) == 2",
"assert pos_count([3,4,5,-1]) == 3",
"assert pos_count([1,2,3,4]) == 4"
] |
[] |
Mary grabbed the apple there. Jeff went back to the bedroom. Bill went to the office. Mary moved to the office. Mary gave the apple to Bill. Mary journeyed to the hallway. Fred moved to the kitchen. Jeff journeyed to the hallway. Bill went to the garden. Bill travelled to the kitchen. Bill passed the apple to Fred. Fred gave the apple to Bill.
|
babilong_0k_qa5_sample_44
| 79
| 119
|
|
329
|
Write a python function to count negative numbers in a list.
|
def neg_count(list):
neg_count= 0
for num in list:
if num <= 0:
neg_count += 1
return neg_count
|
[
"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"
] |
[] |
Sandra went to the garden. Daniel went to the garden.
|
babilong_0k_qa1_sample_29
| 14
| 119
|
|
98
|
Write a function to multiply all the numbers in a list and divide with the length of the list.
|
def multiply_num(numbers):
total = 1
for x in numbers:
total *= x
return total/len(numbers)
|
[
"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"
] |
[] |
Sandra travelled to the bedroom. Sandra journeyed to the garden. Sandra moved to the hallway. Sandra travelled to the bathroom. Mary went to the bathroom. John moved to the office.
|
babilong_0k_qa1_sample_74
| 39
| 120
|
|
93
|
Write a function to calculate the value of 'a' to the power 'b'.
|
def power(a,b):
if b==0:
return 1
elif a==0:
return 0
elif b==1:
return a
else:
return a*power(a,b-1)
|
[
"assert power(3,4) == 81",
"assert power(2,3) == 8",
"assert power(5,5) == 3125"
] |
[] |
The office is north of the bedroom. The kitchen is south of the bedroom.
|
babilong_0k_qa4_sample_79
| 17
| 121
|
|
241
|
Write a function to generate a 3d array having each element as '*'.
|
def array_3d(m,n,o):
array_3d = [[ ['*' for col in range(m)] for col in range(n)] for row in range(o)]
return array_3d
|
[
"assert array_3d(6,4,3)==[[['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*', '*']]]",
"assert array_3d(5,3,4)==[[['*', '*', '*', '*', '*'], ['*', '*', '*', '*','*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'],['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']], [['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*'], ['*', '*', '*', '*', '*']]]",
"assert array_3d(1,2,3)==[[['*'],['*']],[['*'],['*']],[['*'],['*']]]"
] |
[] |
The garden is north of the bedroom. The bedroom is north of the bathroom.
|
babilong_0k_qa4_sample_67
| 17
| 122
|
|
391
|
Write a function to convert more than one list to nested dictionary.
|
def convert_list_dictionary(l1, l2, l3):
result = [{x: {y: z}} for (x, y, z) in zip(l1, l2, l3)]
return result
|
[
"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}}]"
] |
[] |
Daniel journeyed to the office. Daniel went back to the bedroom. Mary went back to the kitchen. Mary got the football there. Daniel travelled to the hallway. John journeyed to the bedroom. Daniel got the apple there. Sandra travelled to the garden. Daniel travelled to the garden. Daniel dropped the apple. Mary left the football. Mary journeyed to the bedroom. John moved to the hallway. John went back to the bedroom. Sandra got the apple there. John went to the kitchen. Mary went to the bathroom. Mary journeyed to the garden. Sandra went back to the kitchen. Sandra put down the apple there. Mary went back to the bedroom. Mary went back to the kitchen.
|
babilong_0k_qa2_sample_4
| 142
| 122
|
|
27
|
Write a python function to remove all digits from a list of strings.
|
import re
def remove(list):
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return 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']"
] |
[] |
Mary went to the kitchen. John went back to the kitchen. Daniel went back to the hallway. Daniel went to the bathroom. Sandra travelled to the bathroom. Sandra travelled to the bedroom. Daniel went to the kitchen. Daniel moved to the office. Mary moved to the bathroom. Mary went back to the hallway.
|
babilong_0k_qa1_sample_11
| 64
| 123
|
|
174
|
Write a function to group a sequence of key-value pairs into a dictionary of lists.
|
def group_keyvalue(l):
result = {}
for k, v in l:
result.setdefault(k, []).append(v)
return result
|
[
"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]}"
] |
[] |
Mary travelled to the bedroom. Daniel grabbed the apple there. Daniel went to the garden. John travelled to the office. Daniel left the apple. John travelled to the hallway. Sandra went to the office. Daniel journeyed to the hallway. Daniel went to the kitchen. John journeyed to the kitchen. Mary moved to the office. Mary went back to the garden. Mary moved to the office. John went back to the bathroom. John travelled to the office. Daniel went back to the garden. John travelled to the kitchen. Mary went to the bedroom. Daniel moved to the bathroom. Daniel picked up the football there. Sandra travelled to the hallway. Daniel picked up the milk there. Daniel dropped the milk. Daniel took the milk there. Daniel moved to the bedroom. Sandra went to the garden. Sandra travelled to the kitchen. Sandra travelled to the office.
|
babilong_0k_qa2_sample_21
| 174
| 123
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.