__index_level_0__
int64
0
1.75k
problem
stringclasses
48 values
entrypoint
stringclasses
48 values
assertions
stringclasses
48 values
username
stringclasses
80 values
submitted_text
stringlengths
20
895
prompt
stringlengths
62
1.1k
subset
stringclasses
4 values
0
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student1
takes a list of strings, integers, and floats and returns the sum of all the integers and floats.
def add_up(arr): """ $takes:takes$ a $list:list$ of $strings:strings$, $integers:integers$, and floats and $returns:returns$ the sum of all the $integers:integers$ and floats. """
first_failure
2
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student1
takes a list of strings, integers, and floats and returns the sum of all the ints and floats.
def add_up(arr): """ $takes:takes$ a $list:list$ of $strings:strings$, $integers:integers$, and floats and $returns:returns$ the sum of all the $integers:ints$ and floats. """
last_failure
3
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student6
Input: list of items, that may be a combination of strings and integers. Function takes the sum of the integers and outputs it
def add_up(arr): """ $Input:Input$: $list:list$ of $keys:items$, that may be a combination of $strings:strings$ and $integers:integers$. Function $takes:takes$ the sum of the $integers:integers$ and $returns:outputs$ it """
first_failure
5
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student6
Input: list of strings. Function checks each item in the list to check if it is a number character. If it is a number, convert it to an integer and it adds it to a new list. If it is not a number integer it ignores it. Outputs the sum of each ingter in the new list. If the original list contains no integers, return 0
def add_up(arr): """ $Input:Input$: $list:list$ of $strings:strings$. Function checks each $key:item$ in the $list:list$ to check if it is a number $string:character$. If it is a number, $typecast:convert$ it to an $integer:integer$ and it $inserts:adds$ it to a new $list:list$. If it is not a number $integer:integer$ it $skips:ignores$ it. $Returns:Outputs$ the sum of each ingter in the new $list:list$. If the original $list:list$ contains no $integers:integers$, $return:return$ 0 """
last_failure
6
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student7
sums the total of integers and floats in an array. strings are ignored, empty spots count as 0
def add_up(arr): """ sums the total of $integers:integers$ and floats in an $list:array$. $strings:strings$ are $skipped:ignored$, empty spots count as 0 """
first_failure
11
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student7
iterates through the column and rows and sums the total of integers and floats. strings are ignored, empty spots count as 0
def add_up(arr): """ $loops through:iterates through$ the column and rows and sums the total of $integers:integers$ and floats. $strings:strings$ are $skipped:ignored$, empty spots count as 0 """
last_success
22
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student14
add up all number characters in the brackets and output the result
def add_up(arr): """ $insert:add$ up all number $strings:characters$ in the $lists:brackets$ and $return:output$ the result """
first_failure
26
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student14
add up all number characters in each arrangement. output total
def add_up(arr): """ $insert:add$ up all number $strings:characters$ in each arrangement. $return:output$ total """
last_failure
27
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student15
Adds the numbers in the list and returns the number. If there are no numbers, returns 0.
def add_up(arr): """ $Inserts:Adds$ the numbers in the $list:list$ and $returns:returns$ the number. If there are no numbers, $returns:returns$ 0. """
first_failure
31
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student15
For each variable in the list, if the variable can be casted to a float, adds the variable to a separate list. Adds the number in this list together and returns the number. If there are no numbers, returns 0.
def add_up(arr): """ For each $key:variable$ in the $list:list$, if the $key:variable$ can be $typecasted:casted$ to a float, $inserts:adds$ the $key:variable$ to a separate $list:list$. $Inserts:Adds$ the number in this $list:list$ together and $returns:returns$ the number. If there are no numbers, $returns:returns$ 0. """
last_failure
32
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student24
For items in the list, if the item is an integer add them together. Return the sum of those integers.
def add_up(arr): """ For $keys:items$ in the $list:list$, if the $key:item$ is an $integer:integer$ $insert:add$ them together. $Return:Return$ the sum of those $integers:integers$. """
first_failure
33
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student24
For items in the list inside the list add each item together. If the item is not an integer, ignore any errors. Return the sum of the integers in the list.
def add_up(arr): """ For $keys:items$ in the $list:list$ inside the $list:list$ $insert:add$ each $key:item$ together. If the $key:item$ is not an $integer:integer$, $skip:ignore$ any errors. $Return:Return$ the sum of the $integers:integers$ in the $list:list$. """
last_success
34
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student28
This function takes one paramater, arr. arr can consist of a string and integers or it can be empty. The code adds up all the integers in arr. And it only returns the sum of all the integers in arr.
def add_up(arr): """ This function $takes:takes$ one paramater, arr. arr can consist of a $string:string$ and $integers:integers$ or it can be empty. The code $inserts:adds$ up all the $integers:integers$ in arr. And it only $returns:returns$ the sum of all the $integers:integers$ in arr. """
first_failure
35
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student31
Takes a list with another internal list. Creates a new float variable and sets it to zero, and then converts each item in the internal list to a float in any way possible and adds them to the float variable. Then, returns that float variable.
def add_up(arr): """ $Takes:Takes$ a $list:list$ with another internal $list:list$. Creates a new float $key:variable$ and $lists:sets$ it to zero, and then $typecasts:converts$ each $key:item$ in the internal $list:list$ to a float in any way possible and $inserts:adds$ them to the float $key:variable$. Then, $returns:returns$ that float $key:variable$. """
first_failure
37
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student31
Takes a list with a list inside. Then, creates a new list and for every item in the input list, takes each element inside that item and adds it to a new list called trueList. Creates a new float variable and sets it to zero, and then converts each item in trueList to a float in any way possible and adds them to the float variable. Then, returns that float variable.
def add_up(arr): """ $Takes:Takes$ a $list:list$ with a $list:list$ inside. Then, creates a new $list:list$ and for every $key:item$ in the $input:input$ $list:list$, $takes:takes$ each $key:element$ inside that $key:item$ and $inserts:adds$ it to a new $list:list$ called trueList. Creates a new float $key:variable$ and $lists:sets$ it to zero, and then $typecasts:converts$ each $key:item$ in trueList to a float in any way possible and $inserts:adds$ them to the float $key:variable$. Then, $returns:returns$ that float $key:variable$. """
last_failure
38
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student39
For this function your goal is to add up the numbers given to in the input list. Only add up the integers and not numbers represented as a string.
def add_up(arr): """ For this function your goal is to $insert:add$ up the numbers given to in the $input:input$ $list:list$. Only $insert:add$ up the $integers:integers$ and not numbers represented as a $string:string$. """
first_failure
39
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student45
Takes an array. Adds up each number in the array. Outputs the total.
def add_up(arr): """ $Takes:Takes$ an $list:array$. $Inserts:Adds$ up each number in the $list:array$. $Returns:Outputs$ the total. """
first_failure
42
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student45
Takes an array. Reads each value in the array. If it is a number, adds it to the sum. If it is not a number, skips to the next value in the array. Output is the sum of all the numbers in the array.
def add_up(arr): """ $Takes:Takes$ an $list:array$. Reads each value in the $list:array$. If it is a number, $inserts:adds$ it to the sum. If it is not a number, $skips:skips$ to the next value in the $list:array$. $Return:Output$ is the sum of all the numbers in the $list:array$. """
last_failure
43
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student46
Takes in an array, outputs all integers added together that are in the array.
def add_up(arr): """ $Takes:Takes$ in an $list:array$, $returns:outputs$ all $integers:integers$ $inserted:added$ together that are in the $list:array$. """
first_failure
48
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student46
Takes in a array and withing that array list, from the list removes all strings, outputs all numbers added together that are in the array.
def add_up(arr): """ $Takes:Takes$ in a $list:array$ and withing that $list:array$ $list:list$, from the $list:list$ $skips:removes$ all $strings:strings$, $returns:outputs$ all numbers $inserted:added$ together that are in the $list:array$. """
last_failure
49
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student47
"add up all the floats in arr"
def add_up(arr): """ "$insert:add$ up all the floats in arr" """
first_failure
55
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student47
"add all the doubles in arr into a double named sum, neglect the item if the item in arr is not a double, return sum"
def add_up(arr): """ "$insert:add$ all the doubles in arr into a double named sum, $skip:neglect$ the $key:item$ if the $key:item$ in arr is not a double, $return:return$ sum" """
last_failure
56
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student53
loop through each list in arr and then loop again for each element and if the element is an integer or float add them to a new list and return the sum of that new list.
def add_up(arr): """ $loop through:loop through$ each $list:list$ in arr and then loop again for each $key:element$ and if the $key:element$ is an $integer:integer$ or float $insert:add$ them to a new $list:list$ and $return:return$ the sum of that new $list:list$. """
first_success
58
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student53
loop through each list in arr and then loop again for each elemtn and if the element is an integer or float add them and return the sum.
def add_up(arr): """ $loop through:loop through$ each $list:list$ in arr and then loop again for each elemtn and if the $key:element$ is an $integer:integer$ or float $insert:add$ them and $return:return$ the sum. """
last_failure
59
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student55
Write a function that runs through an array of lists. The function should get all numbers from the list and returns the sum of all numbers. The function should avoid strings if they are elements in the list.
def add_up(arr): """ Write a function that $loops through:runs through$ an $list:array$ of $lists:lists$. The function should $take:get$ all numbers from the $list:list$ and $returns:returns$ the sum of all numbers. The function should $skip:avoid$ $strings:strings$ if they are $keys:elements$ in the $list:list$. """
first_failure
65
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student55
Write a function that gets a list. The function runs through a list of lists. If the element is an integer or float, sum all the elements up. The function returns the sum. The function should avoid strings if they are elements in the list.
def add_up(arr): """ Write a function that $takes:gets$ a $list:list$. The function $loops through:runs through$ a $list:list$ of $lists:lists$. If the $key:element$ is an $integer:integer$ or float, sum all the $keys:elements$ up. The function $returns:returns$ the sum. The function should $skip:avoid$ $strings:strings$ if they are $keys:elements$ in the $list:list$. """
last_failure
66
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student58
add the numbers in the list
def add_up(arr): """ $insert:add$ the numbers in the $list:list$ """
first_failure
69
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student58
Return the sum of the integers in the list. Ignore the string.
def add_up(arr): """ $Return:Return$ the sum of the $integers:integers$ in the $list:list$. $Skip:Ignore$ the $string:string$. """
last_failure
70
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student65
This function takes entries in the first entry of an array, and adds them to the total if the entry is a number. Otherwise, it adds 0.
def add_up(arr): """ This function $takes:takes$ $keys:entries$ in the first $key:entry$ of an $list:array$, and $inserts:adds$ them to the total if the $key:entry$ is a number. Otherwise, it $inserts:adds$ 0. """
first_failure
75
add_up
add_up
assert add_up([ [ 'one', 2, 3, 4 ] ]) == 9 assert add_up([ [ 3, 'hello', 3.4 ] ]) == 6.4 assert add_up([ [ ] ]) == 0
student65
For each list in an array, this function takes each entry in the list and adds them to the total if the entry is a number. Otherwise, it adds 0.
def add_up(arr): """ For each $list:list$ in an $list:array$, this function $takes:takes$ each $key:entry$ in the $list:list$ and $inserts:adds$ them to the total if the $key:entry$ is a number. Otherwise, it $inserts:adds$ 0. """
last_failure
76
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student27
The input will be a list of integers. Return 0 if the list is empty. Otherwise, subtract the sum of all the integers with odd positions from the sum of all the integers with even positions.
def subtract_add(lst): """ The $input:input$ will be a $list:list$ of $integers:integers$. $Return:Return$ 0 if the $list:list$ is empty. Otherwise, subtract the sum of all the $integers:integers$ with odd positions from the sum of all the $integers:integers$ with even positions. """
first_failure
77
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student27
The input will be a list of strings. Return 0 if the list is empty. Otherwise, convert the strings into integers, then subtract the sum of all the integers with odd positions from the sum of all the integers with even positions.
def subtract_add(lst): """ The $input:input$ will be a $list:list$ of $strings:strings$. $Return:Return$ 0 if the $list:list$ is empty. Otherwise, $typecast:convert$ the $strings:strings$ into $integers:integers$, then subtract the sum of all the $integers:integers$ with odd positions from the sum of all the $integers:integers$ with even positions. """
last_success
78
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student29
For each list entry, convert the input to an integer. Multiply list entries that correspond to an even index by -1. Then add all of the list entries together and return their sum. If the list is empty, return 0.
def subtract_add(lst): """ For each $list:list$ $key:entry$, $typecast:convert$ the $input:input$ to an $integer:integer$. Multiply $list:list$ $keys:entries$ that correspond to an even index by -1. Then $insert:add$ all of the $list:list$ $keys:entries$ together and $return:return$ their sum. If the $list:list$ is empty, $return:return$ 0. """
first_failure
80
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student29
For each list entry, convert the input to an integer. Multiply list entries that don't correspond to an even index by -1. Then add all of the list entries together and return their sum. If the list is empty, return 0.
def subtract_add(lst): """ For each $list:list$ $key:entry$, $typecast:convert$ the $input:input$ to an $integer:integer$. Multiply $list:list$ $keys:entries$ that don't correspond to an even index by -1. Then $insert:add$ all of the $list:list$ $keys:entries$ together and $return:return$ their sum. If the $list:list$ is empty, $return:return$ 0. """
last_success
81
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student32
subtracts the last element in the list from the sum of all the other elements in the list.
def subtract_add(lst): """ subtracts the last $key:element$ in the $list:list$ from the sum of all the other $keys:elements$ in the $list:list$. """
first_failure
84
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student32
Turns all the elements in lst into integers, then finds the sum of all the elements in the list excluding the last one. Then it subtracts the last element from the sum. If the list is empty, it returns 0
def subtract_add(lst): """ $Typecasts:Turns$ all the $keys:elements$ in lst into $integers:integers$, then finds the sum of all the $keys:elements$ in the $list:list$ excluding the last one. Then it subtracts the last $key:element$ from the sum. If the $list:list$ is empty, it $returns:returns$ 0 """
last_failure
85
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student34
Find the sum of the items in the list with positions that produce an integer when divided by two, then find the sum of the items in the list with positions that do not produce an integer when divided by two. Then take the first sum and subtract the second sum from it. If there are no items in the list output 0
def subtract_add(lst): """ Find the sum of the $keys:items$ in the $list:list$ with positions that $return:produce$ an $integer:integer$ when divided by two, then find the sum of the $keys:items$ in the $list:list$ with positions that do not $return:produce$ an $integer:integer$ when divided by two. Then $take:take$ the first sum and subtract the second sum from it. If there are no $keys:items$ in the $list:list$ $return:output$ 0 """
first_failure
86
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student49
Given a list of integers, take the first number in the list and alternate between subtracting and adding the next numbers in the list. If the list is empty return 0. Otherwise return the expected output
def subtract_add(lst): """ Given a $list:list$ of $integers:integers$, $take:take$ the first number in the $list:list$ and alternate between subtracting and $inserting:adding$ the next numbers in the $list:list$. If the $list:list$ is empty $return:return$ 0. Otherwise $return:return$ the expected $return:output$ """
first_failure
87
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student49
Given a list of strings, type cast to integers and then take the first number in the list and alternate between subtracting and adding the next numbers in the list. If the list is empty return 0. Otherwise return the expected output
def subtract_add(lst): """ Given a $list:list$ of $strings:strings$, $typecast:type cast$ to $integers:integers$ and then $take:take$ the first number in the $list:list$ and alternate between subtracting and $inserting:adding$ the next numbers in the $list:list$. If the $list:list$ is empty $return:return$ 0. Otherwise $return:return$ the expected $return:output$ """
last_success
89
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student62
alternate between subtracting and adding each element in list, return total
def subtract_add(lst): """ alternate between subtracting and $inserting:adding$ each $key:element$ in $list:list$, $return:return$ total """
first_failure
94
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student62
turn each element into int, add first element to count. if index of element is odd when int, subtract from count. if index of element is even when int, add to count.
def subtract_add(lst): """ $typecast:turn$ each $key:element$ into $integer:int$, $insert:add$ first $key:element$ to count. if index of $key:element$ is odd when $integer:int$, subtract from count. if index of $key:element$ is even when $integer:int$, $insert:add$ to count. """
last_failure
100
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student66
Change the first two items into integers Subtract the second item in the array list from the first item. change the third and forth items into integers then subtract the forth item from the third item then add the two sums. if there are just two items in list change those two items into integers subtract the second one from the first one and return the product. if there are no items then return zero
def subtract_add(lst): """ $Typecast:Change$ the first two $keys:items$ into $integers:integers$ Subtract the second $key:item$ in the $list:array$ $list:list$ from the first $key:item$. $typecast:change$ the third and forth $keys:items$ into $integers:integers$ then subtract the forth $key:item$ from the third $key:item$ then $insert:add$ the two sums. if there are just two $keys:items$ in $list:list$ $typecast:change$ those two $keys:items$ into $integers:integers$ subtract the second one from the first one and $return:return$ the product. if there are no $keys:items$ then $return:return$ zero """
last_success
101
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student67
Subtracts the second number from the first one, stores that value. Then adds that value to the next number, etc.
def subtract_add(lst): """ Subtracts the second number from the first one, stores that value. Then $inserts:adds$ that value to the next number, etc. """
first_failure
103
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student67
Converts all items to integer. Subtracts the second number from the first one, stores that value. Then adds that value to the next number, etc. Returns the final value.
def subtract_add(lst): """ $Typecasts:Converts$ all $keys:items$ to $integer:integer$. Subtracts the second number from the first one, stores that value. Then $inserts:adds$ that value to the next number, etc. $Returns:Returns$ the final value. """
last_failure
104
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student68
given an array of characters containing integers, convert the characters into integers. Starting from the front of the array, subtract the first two numbers and store that in a count variable. then add the next number to the count. alternate between subtracting and adding until you get to the end of the array. return the count
def subtract_add(lst): """ given an $list:array$ of $strings:characters$ containing $integers:integers$, $typecast:convert$ the $strings:characters$ into $integers:integers$. Starting from the front of the $list:array$, subtract the first two numbers and store that in a count $key:variable$. then $insert:add$ the next number to the count. alternate between subtracting and $inserting:adding$ until you $take:get$ to the end of the $list:array$. $return:return$ the count """
first_failure
107
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student68
Given an array of characters containing integers, convert the characters into integers. Store the first number in the array in a count variable. then subtract the next number from the count. With the next number, add it to the count and then alternate between subtracting and adding until you get to the end of the array. return the count. If the given array is empty, return 0.
def subtract_add(lst): """ Given an $list:array$ of $strings:characters$ containing $integers:integers$, $typecast:convert$ the $strings:characters$ into $integers:integers$. Store the first number in the $list:array$ in a count $key:variable$. then subtract the next number from the count. With the next number, $insert:add$ it to the count and then alternate between subtracting and $inserting:adding$ until you $take:get$ to the end of the $list:array$. $return:return$ the count. If the given $list:array$ is empty, $return:return$ 0. """
last_success
108
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student70
Iterates through the inputted list. For the first two elements, subtract the second from the first and save that result. For the next element, add it to the result. Continue to alternate adding and subtracting until the end of the list is reached.
def subtract_add(lst): """ Iterates through the $inputted:inputted$ $list:list$. For the first two $keys:elements$, subtract the second from the first and save that result. For the next $key:element$, $insert:add$ it to the result. Continue to alternate $inserting:adding$ and subtracting until the end of the $list:list$ is reached. """
first_failure
112
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student70
Create a variable for the result. Treat all elements as integers. If the list contains 0 elements, return 0. If the list contains 1 element, return that element. If the list contains 2 or more elements: subtract the second element from the first and save the result, then add the third element to that result, and continue on alternating subtraction and addition until the end of the list.
def subtract_add(lst): """ Create a $key:variable$ for the result. $Typecast:Treat$ all $keys:elements$ as $integers:integers$. If the $list:list$ contains 0 $keys:elements$, $return:return$ 0. If the $list:list$ contains 1 $key:element$, $return:return$ that $key:element$. If the $list:list$ contains 2 or more $keys:elements$: subtract the second $key:element$ from the first and save the result, then $insert:add$ the third $key:element$ to that result, and continue on alternating subtraction and addition until the end of the $list:list$. """
last_failure
113
subtract_add
subtract_add
assert subtract_add(['1', '2', '3', '4']) == -2 assert subtract_add(['0', '2']) == -2 assert subtract_add(['0', '0']) == 0 assert subtract_add([ ]) == 0
student78
given a list, convert each item in the list to an integer. subract the second integer from the first and then with that total, add the next integer. with that total subtract the next integer. repeat this until all integers in the list have been either added or subtracted and output the final total. if the list is blank, output 0.
def subtract_add(lst): """ given a $list:list$, $typecast:convert$ each $key:item$ in the $list:list$ to an $integer:integer$. subract the second $integer:integer$ from the first and then with that total, $insert:add$ the next $integer:integer$. with that total subtract the next $integer:integer$. repeat this until all $integers:integers$ in the $list:list$ have been either $inserted:added$ or subtracted and $return:output$ the final total. if the $list:list$ is blank, $return:output$ 0. """
first_success
114
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student0
takes a list of numbers and returns a list with the corresponding indexes of the alphabet, where negative numbers as indexes means to take in the next index as a new string
def convert(lst): """ $takes:takes$ a $list:list$ of numbers and $returns:returns$ a $list:list$ with the corresponding indexes of the alphabet, where negative numbers as indexes means to $take:take$ in the next index as a new $string:string$ """
first_failure
122
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student0
takes a list of numbers. Create a ABC list with the capital letters in the alphabet and create an answer string. Iterate through the input list, if there is "-1" then add ' ' to the answer string, or otherwise, add the letter with the corresponding index of the answer string. Split the answer string at ' '. return the answer string.
def convert(lst): """ $takes:takes$ a $list:list$ of numbers. Create a ABC $list:list$ with the capital letters in the alphabet and create an answer $string:string$. Iterate through the $input:input$ $list:list$, if there is "-1" then $insert:add$ ' ' to the answer $string:string$, or otherwise, $insert:add$ the letter with the corresponding index of the answer $string:string$. Split the answer $string:string$ at ' '. $return:return$ the answer $string:string$. """
last_success
123
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student3
convert the list of index number into list of letters of corresponding index numbers of alphabetical table
def convert(lst): """ $typecast:convert$ the $list:list$ of index number into $list:list$ of letters of corresponding index numbers of alphabetical table """
first_failure
135
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student3
convert the list of index number into string of capital letters of corresponding index numbers of alphabetical table and then insert into a list
def convert(lst): """ $typecast:convert$ the $list:list$ of index number into $string:string$ of capital letters of corresponding index numbers of alphabetical table and then $insert:insert$ into a $list:list$ """
last_failure
136
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student4
converts a list of numbers into a list of letters, letter values are assigned consecutively beginning at the index 0, creating a new item in new list when -1 is in the inputted list
def convert(lst): """ $typecasts:converts$ a $list:list$ of numbers into a $list:list$ of letters, letter values are assigned consecutively beginning at the index 0, creating a new $key:item$ in new $list:list$ when -1 is in the $inputted:inputted$ $list:list$ """
first_failure
138
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student4
create a new list with stings of letters, inputted numbers correspond to the index in the alphabet beginning at zero, begins a new item in the new list when '-1' is passed
def convert(lst): """ create a new $list:list$ with stings of letters, $inputted:inputted$ numbers correspond to the index in the alphabet beginning at zero, begins a new $key:item$ in the new $list:list$ when '-1' is passed """
last_failure
139
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student10
User inputs a list of integers from 0-25. Function converts integers into letters by matching the number with the corresponding letter of the alphabet. Function would return a list of letters. When the user inputs -1, function should end current string in list and start a new string.
def convert(lst): """ User $inputs:inputs$ a $list:list$ of $integers:integers$ from 0-25. Function $typecasts:converts$ $integers:integers$ into letters by matching the number with the corresponding letter of the alphabet. Function would $return:return$ a $list:list$ of letters. When the user $inputs:inputs$ -1, function should end current $string:string$ in $list:list$ and start a new $string:string$. """
first_failure
141
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student10
User inputs a list of numbers ranging from -1 to 25, and function outputs a list of the corresponding letters and line breaks. Function converts the integers from 0-25 into letters by matching the number with the corresponding letter of the alphabet. When the user inputs -1, function should end current string in list and start a new string. Function should return a list of the letters.
def convert(lst): """ User $inputs:inputs$ a $list:list$ of numbers ranging from -1 to 25, and function $returns:outputs$ a $list:list$ of the corresponding letters and line breaks. Function $typecasts:converts$ the $integers:integers$ from 0-25 into letters by matching the number with the corresponding letter of the alphabet. When the user $inputs:inputs$ -1, function should end current $string:string$ in $list:list$ and start a new $string:string$. Function should $return:return$ a $list:list$ of the letters. """
last_failure
142
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student17
change numbers to letters matching the order of the alphabet starting at 0 as A
def convert(lst): """ $typecast:change$ numbers to letters matching the order of the alphabet starting at 0 as A """
first_failure
173
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student17
change numbers to letters matching the order of the alphabet starting at 0 as A, and grouping the output as one string in a list, using -1 as places to slice.
def convert(lst): """ $typecast:change$ numbers to letters matching the order of the alphabet starting at 0 as A, and grouping the $return:output$ as one $string:string$ in a $list:list$, using -1 as places to slice. """
last_success
174
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student18
Assign a number from 0~25 to each alphabet, and create a list of string of alphabetical letters based on their assigned numbers in the lst. When there is -1 in the lst, create a new string and add it to the list. Return a list of created strings.
def convert(lst): """ Assign a number from 0~25 to each alphabet, and create a $list:list$ of $string:string$ of alphabetical letters based on their assigned numbers in the lst. When there is -1 in the lst, create a new $string:string$ and $insert:add$ it to the $list:list$. $Return:Return$ a $list:list$ of created $strings:strings$. """
first_failure
177
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student18
Assign a number from 0~25 to each alphabet, and create a list. Based on their assigned numbers in the lst, create string of capitalized alphabetical letters and add to the list. When there is -1 in the lst, create a new string from the next index and add it to the list. Return a list of created strings.
def convert(lst): """ Assign a number from 0~25 to each alphabet, and create a $list:list$. Based on their assigned numbers in the lst, create $string:string$ of capitalized alphabetical letters and $insert:add$ to the $list:list$. When there is -1 in the lst, create a new $string:string$ from the next index and $insert:add$ it to the $list:list$. $Return:Return$ a $list:list$ of created $strings:strings$. """
last_failure
178
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student21
each number in the input set corresponds to the order of the alphabet from A to Z, all capital, with 0 being A, 1 being B, etc. the code will produce a list of strings that correspond to the given numbers in the input set, creating a new string only when there is a -1 in the input.
def convert(lst): """ each number in the $input:input$ $list:set$ corresponds to the order of the alphabet from A to Z, all capital, with 0 being A, 1 being B, etc. the code will $return:produce$ a $list:list$ of $strings:strings$ that correspond to the given numbers in the $input:input$ $list:set$, creating a new $string:string$ only when there is a -1 in the $input:input$. """
first_failure
187
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student21
each number in the input set corresponds to the order of the alphabet from A to Z, all capital, with 0 being A, 1 being B, etc. the code will return a list of Strings parsed from the given numbers, with each -1 in the input signifying a separate string.
def convert(lst): """ each number in the $input:input$ $list:set$ corresponds to the order of the alphabet from A to Z, all capital, with 0 being A, 1 being B, etc. the code will $return:return$ a $list:list$ of $Strings:Strings$ parsed from the given numbers, with each -1 in the $input:input$ signifying a separate $string:string$. """
last_failure
188
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student25
This function converts integers to its corresponding letter in the alphabet.
def convert(lst): """ This function $typecasts:converts$ $integers:integers$ to its corresponding letter in the alphabet. """
first_failure
191
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student25
Letters A-Z correspond with numbers 0-25. This function creates a string by replacing the given number with its corresponding number. Input "-1" starts a new output.
def convert(lst): """ Letters A-Z correspond with numbers 0-25. This function creates a $string:string$ by replacing the given number with its corresponding number. $Input:Input$ "-1" starts a new $return:output$. """
last_failure
192
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student26
The absolute values from 0 to 25 correspond to the letters of the alphabet. Take the numbers in a given string and replace them with the letters of the alphabet.
def convert(lst): """ The absolute values from 0 to 25 correspond to the letters of the alphabet. $Take:Take$ the numbers in a given $string:string$ and replace them with the letters of the alphabet. """
first_failure
193
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student26
Create a dictionary where the absolute values of numbers from 0-25 equal capital letters of the alphabet. Replace the numbers in a given string according to the dictionary
def convert(lst): """ Create a $dictionary:dictionary$ where the absolute values of numbers from 0-25 equal capital letters of the alphabet. Replace the numbers in a given $string:string$ according to the $dictionary:dictionary$ """
last_failure
194
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student30
Convert numbers to letters. 0 = A, 1 = B, 2 = C, and so on. -1 = a space.
def convert(lst): """ $Typecast:Convert$ numbers to letters. 0 = A, 1 = B, 2 = C, and so on. -1 = a space. """
first_failure
197
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student30
Convert numbers to letters. 0 = A, 1 = B, 2 = C, and so on. Return strings of letters with no spaces. A -1 in lst indicates the start of a new string. Separate strings with commas. Enclose the new list with brackets.
def convert(lst): """ $Typecast:Convert$ numbers to letters. 0 = A, 1 = B, 2 = C, and so on. $Return:Return$ $strings:strings$ of letters with no spaces. A -1 in lst indicates the start of a new $string:string$. Separate $strings:strings$ with commas. Enclose the new $list:list$ with $lists:brackets$. """
last_failure
198
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student41
Given a list, returns a list with the letter corresponding to each number in the inputted list. If there is a negative one, the corresponding letters should be printed as a separate item in the list. Otherwise, the corresponding letters should be combined as one string in the list.
def convert(lst): """ Given a $list:list$, $returns:returns$ a $list:list$ with the letter corresponding to each number in the $inputted:inputted$ $list:list$. If there is a negative one, the corresponding letters should be $returned:printed$ as a separate $key:item$ in the $list:list$. Otherwise, the corresponding letters should be $concatenated:combined$ as one $string:string$ in the $list:list$. """
first_failure
201
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student41
Given a list, returns a list with letters from the alphabet that correspond to the index in the inputted list, starting from zero. Letters in the returned list should be capitalized. Until a negative one is in the list, letters should be combined as one string. When a negative one is reached this combination of letters can be inserted into the list. A negative one indicates a new item in the list.
def convert(lst): """ Given a $list:list$, $returns:returns$ a $list:list$ with letters from the alphabet that correspond to the index in the $inputted:inputted$ $list:list$, starting from zero. Letters in the $returned:returned$ $list:list$ should be capitalized. Until a negative one is in the $list:list$, letters should be $concatenated:combined$ as one $string:string$. When a negative one is reached this combination of letters can be $inserted:inserted$ into the $list:list$. A negative one indicates a new $key:item$ in the $list:list$. """
last_failure
202
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student48
assign each letter in the alphabet a number 0 through 25 in order. Let -1 indicate the start of a new string. print the letters corresponding to the numbers in a list, creating new strings at -1.
def convert(lst): """ assign each letter in the alphabet a number 0 through 25 in order. Let -1 indicate the start of a new $string:string$. $return:print$ the letters corresponding to the numbers in a $list:list$, creating new $strings:strings$ at -1. """
first_failure
203
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student51
Each character in the alphabet is assigned an index value starting with A =0. Take each item in the list and add the corresponding character to a string. If -1, start the next character with a new string.
def convert(lst): """ Each $string:character$ in the alphabet is assigned an index value starting with A =0. $Take:Take$ each $key:item$ in the $list:list$ and $insert:add$ the corresponding $string:character$ to a $string:string$. If -1, start the next $string:character$ with a new $string:string$. """
first_failure
205
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student51
Each character in the alphabet is assigned an index value starting with A =0. Take each item in the list and add the corresponding character to a string. When -1 appears make a new string and add the following characters to it. return a list of strings.
def convert(lst): """ Each $string:character$ in the alphabet is assigned an index value starting with A =0. $Take:Take$ each $key:item$ in the $list:list$ and $insert:add$ the corresponding $string:character$ to a $string:string$. When -1 appears make a new $string:string$ and $insert:add$ the following $strings:characters$ to it. $return:return$ a $list:list$ of $strings:strings$. """
last_success
206
convert
convert
assert convert([0, 1, 2, 3]) == ['ABCD'] assert convert([0, -1, 1, -1, 2]) == ['A', 'B', 'C'] assert convert([1, 1, 1, -1, 25, 25, 25, -1, 0, 1, 2]) == ['BBB', 'ZZZ', 'ABC']
student52
If there is "0" in lst, then put "A" into new list; If there is "1" in lst, then put "B" into new list; If there is "2" in lst, then put "C" into new list; If there is "4" in lst, then put "D" into new list. Return new list.
def convert(lst): """ If there is "0" in lst, then put "A" into new $list:list$; If there is "1" in lst, then put "B" into new $list:list$; If there is "2" in lst, then put "C" into new $list:list$; If there is "4" in lst, then put "D" into new $list:list$. $Return:Return$ new $list:list$. """
first_failure
208
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student3
change the order of the first and third element of the list
def order_strings(lst): """ $typecast:change$ the order of the first and third $key:element$ of the $list:list$ """
first_failure
210
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student4
orders a list by moving the first element to the end of the list and moving the rest up in index
def order_strings(lst): """ orders a $list:list$ by moving the first $key:element$ to the end of the $list:list$ and moving the rest up in index """
first_failure
212
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student17
reversing the order of the first of the list and revering the order of the second half of the list
def order_strings(lst): """ reversing the order of the first of the $list:list$ and revering the order of the second half of the $list:list$ """
first_failure
219
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student17
reverse the order of the first half of the list and reverse the order of the second half of the list.
def order_strings(lst): """ reverse the order of the first half of the $list:list$ and reverse the order of the second half of the $list:list$. """
last_failure
222
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student25
This function randomly changes the order of the given list.
def order_strings(lst): """ This function randomly $typecasts:changes$ the order of the given $list:list$. """
first_failure
225
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student26
Reverse the order of every other item in a string
def order_strings(lst): """ Reverse the order of every other $key:item$ in a $string:string$ """
first_failure
229
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student30
Use Python random module to return elements of lst in randomized order.
def order_strings(lst): """ Use Python random module to $return:return$ $keys:elements$ of lst in randomized order. """
last_failure
230
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student41
Takes a list. Randomly rearranges the values in the list. Returns the list
def order_strings(lst): """ $Takes:Takes$ a $list:list$. Randomly rearranges the values in the $list:list$. $Returns:Returns$ the $list:list$ """
first_failure
233
order_strings
order_strings
assert order_strings(['c', 'b', 'a', 'd']) == ['b', 'a', 'd', 'c'] assert order_strings([1, 2, 3, 4, 5, 6]) == [3, 2, 1, 6, 5, 4] assert order_strings(['hello', 'aaa', 'bbb', 'ccc']) == ['bbb', 'aaa', 'hello', 'ccc']
student52
For each item in lst, if the item bigger than the last one, then move it as the first item of lst. Return lst.
def order_strings(lst): """ For each $key:item$ in lst, if the $key:item$ bigger than the last one, then move it as the first $key:item$ of lst. $Return:Return$ lst. """
first_failure
235
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student12
For each element in the list lst, if the element is a string, append the number num to the end of the string. If the element is an integer, add num to it. If it is any other type, do not do anything to it.
def add_int(lst, num): """ For each $key:element$ in the $list:list$ lst, if the $key:element$ is a $string:string$, $insert:append$ the number num to the end of the $string:string$. If the $key:element$ is an $integer:integer$, $insert:add$ num to it. If it is any other type, do not do anything to it. """
first_success
236
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student19
Takes an input list (which can have both strings and integers) and an integer. Adds the input integer to each item in the input list.
def add_int(lst, num): """ $Takes:Takes$ an $input:input$ $list:list$ (which can have both $strings:strings$ and $integers:integers$) and an $integer:integer$. $Inserts:Adds$ the $input:input$ $integer:integer$ to each $key:item$ in the $input:input$ $list:list$. """
first_failure
237
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student19
Takes an input list and an input integer. For all strings in the list, the input integer is concatenated after the end of the string. For all numbers in the list, the input integer is added to that number.
def add_int(lst, num): """ $Takes:Takes$ an $input:input$ $list:list$ and an $input:input$ $integer:integer$. For all $strings:strings$ in the $list:list$, the $input:input$ $integer:integer$ is $concatenated:concatenated$ after the end of the $string:string$. For all numbers in the $list:list$, the $input:input$ $integer:integer$ is $inserted:added$ to that number. """
last_success
238
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student20
Append the input num to the end of any strings, and add the input num to any numbers in a list. If there is a list within a list, ignore it.
def add_int(lst, num): """ $Insert:Append$ the $input:input$ num to the end of any $strings:strings$, and $insert:add$ the $input:input$ num to any numbers in a $list:list$. If there is a $list:list$ within a $list:list$, $skip:ignore$ it. """
first_success
239
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student36
Go through the list, if the input is a string concatenate the number outside of the list, if the input is a number add the number outside of the list
def add_int(lst, num): """ Go through the $list:list$, if the $input:input$ is a $string:string$ $concatenate:concatenate$ the number outside of the $list:list$, if the $input:input$ is a number $insert:add$ the number outside of the $list:list$ """
first_failure
240
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student36
Go through the list, if the input is a string concatenate the number outside of the list to the string, if the input is a number add the number outside of the list to the number
def add_int(lst, num): """ Go through the $list:list$, if the $input:input$ is a $string:string$ $concatenate:concatenate$ the number outside of the $list:list$ to the $string:string$, if the $input:input$ is a number $insert:add$ the number outside of the $list:list$ to the number """
last_success
241
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student38
If position in lst is string, append num to string. If position in lst is integer, add num to integer. Return the new lst.
def add_int(lst, num): """ If position in lst is $string:string$, $insert:append$ num to $string:string$. If position in lst is $integer:integer$, $insert:add$ num to $integer:integer$. $Return:Return$ the new lst. """
first_failure
244
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student38
If position in lst is string, append num to string. If position in lst is integer, add num to integer. If position in lst is list, add list to lst. Return the new lst.
def add_int(lst, num): """ If position in lst is $string:string$, $insert:append$ num to $string:string$. If position in lst is $integer:integer$, $insert:add$ num to $integer:integer$. If position in lst is $list:list$, $insert:add$ $list:list$ to lst. $Return:Return$ the new lst. """
last_failure
245
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student42
given an inputed list, return a new list where each element of the new list is an element of the initial list but with the number added to it. if the initial list element is a string, they should concatenate with a string of the number inputted. if the initial list element is a number, they should add normally
def add_int(lst, num): """ given an $inputted:inputed$ $list:list$, $return:return$ a new $list:list$ where each $key:element$ of the new $list:list$ is an $key:element$ of the initial $list:list$ but with the number $inserted:added$ to it. if the initial $list:list$ $key:element$ is a $string:string$, they should $concatenate:concatenate$ with a $string:string$ of the number $inputted:inputted$. if the initial $list:list$ $key:element$ is a number, they should $insert:add$ normally """
first_failure
246
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student42
given an inputed list, return a new list where each element of the new list is an element of the initial list but with the number added to it. if the initial list element is a string, they should concatenate with a string of the number inputted. if the initial list element is a number, they should add normally. if an element of the initial list is neither, leave it alone and add it to the outputted list regardless
def add_int(lst, num): """ given an $inputted:inputed$ $list:list$, $return:return$ a new $list:list$ where each $key:element$ of the new $list:list$ is an $key:element$ of the initial $list:list$ but with the number $inserted:added$ to it. if the initial $list:list$ $key:element$ is a $string:string$, they should $concatenate:concatenate$ with a $string:string$ of the number $inputted:inputted$. if the initial $list:list$ $key:element$ is a number, they should $insert:add$ normally. if an $key:element$ of the initial $list:list$ is neither, leave it alone and $insert:add$ it to the $returned:outputted$ $list:list$ regardless """
last_success
247
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student43
Create a list A. If an element in lst is a string, then append num to the end of the element, add it to A. If an element in lst is a number, then add num to then end of the element, add it to A. If an element in lst is a list, then return the element, add it to A.
def add_int(lst, num): """ Create a $list:list$ A. If an $key:element$ in lst is a $string:string$, then $insert:append$ num to the end of the $key:element$, $insert:add$ it to A. If an $key:element$ in lst is a number, then $insert:add$ num to then end of the $key:element$, $insert:add$ it to A. If an $key:element$ in lst is a $list:list$, then $return:return$ the $key:element$, $insert:add$ it to A. """
first_success
248
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student54
Return a new list with the integer added at each index of the old list.
def add_int(lst, num): """ $Return:Return$ a new $list:list$ with the $integer:integer$ $inserted:added$ at each index of the old $list:list$. """
first_failure
252
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student54
Return a new list with the integer added at each index of the old list. If it is a string, append the integer on to the end of the string to create a new string. If it is an integer, concatenate.
def add_int(lst, num): """ $Return:Return$ a new $list:list$ with the $integer:integer$ $inserted:added$ at each index of the old $list:list$. If it is a $string:string$, $insert:append$ the $integer:integer$ on to the end of the $string:string$ to create a new $string:string$. If it is an $integer:integer$, $concatenate:concatenate$. """
last_success
253
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student57
given a list and an integer, within each element in the list, if it is a string, concatenate integer to end of the string, if element is an integer, add the given integer, if element is a list, do nothing
def add_int(lst, num): """ given a $list:list$ and an $integer:integer$, within each $key:element$ in the $list:list$, if it is a $string:string$, $concatenate:concatenate$ $integer:integer$ to end of the $string:string$, if $key:element$ is an $integer:integer$, $insert:add$ the given $integer:integer$, if $key:element$ is a $list:list$, do nothing """
first_success
254
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student77
Given a list of numbers and strings as well as a number, append the number to the strings in the list, and add the number to the numbers in the list.
def add_int(lst, num): """ Given a $list:list$ of numbers and $strings:strings$ as well as a number, $insert:append$ the number to the $strings:strings$ in the $list:list$, and $insert:add$ the number to the numbers in the $list:list$. """
first_failure
255
add_int
add_int
assert add_int(['hello', 'aaa', 'bbb', 'ccc', 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', 'ccc5', 6, 9] assert add_int([8, 56, 8, '5', '4'], 1) == [9, 57, 9, '51', '41'] assert add_int(['hello', 'aaa', 'bbb', ['list'], 1, 4], 5) == ['hello5', 'aaa5', 'bbb5', ['list'], 6, 9]
student77
Given a list of numbers, lists, and strings as well as a number, append the number to the strings in the list, add the number to the numbers in the list, and do nothing to the lists in the list.
def add_int(lst, num): """ Given a $list:list$ of numbers, $lists:lists$, and $strings:strings$ as well as a number, $insert:append$ the number to the $strings:strings$ in the $list:list$, $insert:add$ the number to the numbers in the $list:list$, and do nothing to the $lists:lists$ in the $list:list$. """
last_success
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
464
Edit dataset card