submission_id
int32 10
42.5k
| func_code
stringlengths 22
782
| assignment_id
stringlengths 4
23
| func_name
stringlengths 4
23
| description
stringlengths 26
128
| test
stringlengths 45
1.22k
| correct
bool 2
classes | user
stringlengths 36
36
| academic_year
int32 2.02k
2.02k
|
---|---|---|---|---|---|---|---|---|
20,644 | def circumference(r):
return 2 * pi * r | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | 11fcbbcf-716f-4e92-ab7c-407d4712c9e8 | 2,016 |
598 | def circumference(r):
return 2 * pi * r | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | 11fcbbcf-716f-4e92-ab7c-407d4712c9e8 | 2,016 |
14,132 | def area(r):
return pi * r * r | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | 11fcbbcf-716f-4e92-ab7c-407d4712c9e8 | 2,016 |
4,713 | def area(r):
return pi * r * r | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | 11fcbbcf-716f-4e92-ab7c-407d4712c9e8 | 2,016 |
19,450 | def area(r):
return pi * r * r | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | 11fcbbcf-716f-4e92-ab7c-407d4712c9e8 | 2,016 |
40,507 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
if a[mid] < q:
low = mid + 1
else:
high = mid
return low | bsearch | bsearch | Search for element q in the sorted array a. | assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
15,821 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
if a[mid] < q:
low = mid + 1
else:
high = mid
return low | bsearch | bsearch | Search for element q in the sorted array a. | assert bsearch([],12)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],5)==4 and bsearch([1, 2, 3, 4, 6, 7, 8],1)==0 and bsearch([1, 2, 3, 4, 6, 7, 8],4)==3 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
25,705 | def selection_sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1
return a | selection_sort | selection_sort | Sort a list by repeatedly move minimimum of remaining sublist to front. | assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204] | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
21,731 | def selection_sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1
return a | selection_sort | selection_sort | Sort a list by repeatedly move minimimum of remaining sublist to front. | assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204] | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
17,839 | def reverse(a):
return a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
23,230 | def swap(a, i, j):
for k in a:
a[i], a[j] = a[j], a[i]
return a
def reverse(a):
return swap(a) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
14,842 | def reverse(a):
return [i for i in range(len(a), 0, -1)] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
33,187 | def reverse(a):
new = []
for i in a.__reversed__():
new.append(i)
return new | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
13,173 | def swap(a, i='', j=''):
if i == '' and j == '':
i = 0
j = len(a) - 1
k = 0
while k < len(a) / 2:
a[i], a[j] = a[j], a[i]
i += 1
j -= 1
k += 1
else:
a[i], a[j] = a[j], a[i]
return a
def reverse(a):
return swap(a) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
16,424 | def swap(a, i='', j=''):
if i == '' and j == '':
i = 0
j = len(a) - 1
k = 0
while k < len(a) / 2:
a[i], a[j] = a[j], a[i]
i += 1
j -= 1
k += 1
else:
a[i], a[j] = a[j], a[i]
return a
def reverse(a):
return swap(a) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
36,000 | def swap(a, i='', j=''):
if i == '' and j == '':
i = 0
j = len(a) - 1
k = 0
while k < len(a) / 2:
a[i], a[j] = a[j], a[i]
i += 1
j -= 1
k += 1
else:
a[i], a[j] = a[j], a[i]
return a
def reverse(a):
return swap(a) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,016 |
20,758 | def double(n):
return n * n | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
19,840 | def double(n):
return 2 * n | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
42,131 | def double(n):
return 2 * n | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
16,466 | def area(r):
return pi * r ** 2 | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
18,398 | def circumference(r):
return 2 * pi * r | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
30,041 | def circumference(r):
return 2 * pi * r | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
4,038 | def circumference(r):
return 2 * pi * r | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
6,239 | def area(r):
return pi * r ** 2 | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
40,876 | def area(r):
return pi * r ** 2 | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
22,005 | def swap(a, i, j):
tmp = a[i]
a[i] = a[j]
a[j] = tmp
def reverse(a):
i = 0
while i < len(a) / 2:
swap(a, i, len(a) - 1 - i)
i = i + 1 | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
5,647 | def swap(a, i, j):
tmp = a[i]
a[i] = a[j]
a[j] = tmp
def reverse(a):
i = 0
while i < len(a) / 2:
swap(a, i, len(a) - 1 - i)
i = i + 1 | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
10,359 | def selection_sort(a):
i = 0
while i < len(a):
p = i
j = j + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1
return a | selection_sort | selection_sort | Sort a list by repeatedly move minimimum of remaining sublist to front. | assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204] | false | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
27,779 | def selection_sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1
return a | selection_sort | selection_sort | Sort a list by repeatedly move minimimum of remaining sublist to front. | assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204] | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
8,227 | def selection_sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1
return a | selection_sort | selection_sort | Sort a list by repeatedly move minimimum of remaining sublist to front. | assert selection_sort([])==[] and selection_sort([0])==[0] and selection_sort([25204, -1, -18176])==[-18176, -1, 25204] and selection_sort([-18176, -1, 25204])==[-18176, -1, 25204] | true | fe81d9d2-29fa-4a6b-abc0-109c9697b557 | 2,016 |
36,664 | def double(n):
return n * 2 | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
9,828 | def double(n):
return n * 2 | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
17,434 | def circumference(radius):
return 2 * pi * radius | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
37,853 | def area(radius):
return pi * radius ** 2 | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
25,057 | def area(radius):
return pi * radius ** 2 | area | area | Return the area of a circle with the given coordinates. | assert area(0)==0.0 and area(-14329)==644910876.981 | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
19,005 | def circumference(radius):
return 2 * pi * radius | circumference | circumference | Return the circumference of a circle. | assert circumference(0)==0.0 and circumference(-23091)==-145057.662 | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
37,769 | def reverse():
a = a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
6,530 | def reverse(a):
a = a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
34,372 | def reverse(a):
return a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
8,239 | def reverse(b):
a = b[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
2,798 | def reverse(b):
print(a[::-1]) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
19,087 | def reverse(a):
a = a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
11,017 | def reverse(a):
a = a[::-1]
return a | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
27,245 | def reverse(a):
print(a[::-1]) | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | false | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
3,446 | def reverse(a):
return a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
3,661 | def reverse(a):
return a[::-1] | reverse_by_swap | reverse | Reverse a list of elements by swapping its elements. | assert reverse([])==[] and reverse([0])==[0] and reverse([-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052])==[1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103] and reverse([-103, 113466788817036974729578468346735566318, 31758, 1867157052, 10933, -70, 1867157052])==[1867157052, -70, 10933, 1867157052, 31758, 113466788817036974729578468346735566318, -103] and reverse([1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103])==[-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052] and reverse([1867157052, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, -103])==[-103, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, 1867157052] and reverse([-103, 113466788817036974729578468346735566318, 31758, -70, 10933, 1867157052, 1867157052])==[1867157052, 1867157052, 10933, -70, 31758, 113466788817036974729578468346735566318, -103] and reverse([[1]])==[[1]] | true | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,016 |
20,395 | def swap(a, i, j):
tmp = a[i]
a[i] = a[j]
a[j] = tmp
def find_position_of_smallest(a, i):
p = i
i = i + 1
while i < len(a):
if a[i] < a[p]:
p = i
i = i + 1
return p
def sort(a):
i = 0
while i < len(a):
p = find_position_of_smallest(a, i)
swap(a, i, p)
i += 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | df8dd1dd-a7c8-46c0-b89f-ec170a81f08a | 2,016 |
2,858 | def swap(a, i, j):
tmp = a[i]
a[i] = a[j]
a[j] = tmp
def find_position_of_smallest(a, i):
p = i
i = i + 1
while i < len(a):
if a[i] < a[p]:
p = i
i = i + 1
return p
def sort(a):
i = 0
while i < len(a):
p = find_position_of_smallest(a, i)
swap(a, i, p)
i += 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | df8dd1dd-a7c8-46c0-b89f-ec170a81f08a | 2,016 |
31,887 | def square_area(side):
result = side * side
return result | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
11,211 | def square_area(side):
result = side * side
return result | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
30,238 | def circle_area(n):
ca = 2 * 3.14 * n
return cc | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | false | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
21,974 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
6,350 | def rectangle_perimeter(n, a):
rp = n + n + a + a
return rp | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
22,375 | def square_perimeter(n):
sa = n * 4
return sp | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | false | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
8,098 | def square_perimeter(n):
sp = n * 4
return sp | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
32,234 | def rectangle_perimeter(n, a):
rp = n + n + a + a
return rp | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
42,382 | def circle_area(n):
cc = 2 * 3.14 * n
return cc | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | false | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
28,663 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
29,338 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
13,057 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
39,817 | def square_perimeter(n):
sp = n * 4
return sp | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
4,314 | def circle_area(n):
ca = 3.14 * (n * n)
return ca | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
40,398 | def rectangle_perimeter(n, a):
rp = n + n + a + a
return rp | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
25,309 | def circle_area(n):
ca = 3.14 * (n * n)
return ca | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
13,068 | def circle_circumference(n):
cc = 2 * 3.14 * n
return cc | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
28,066 | def rectangle_perimeter(n, a):
rp = n + n + a + a
return rp | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
4,884 | def square_perimeter(n):
sp = n * 4
return sp | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
17,732 | def circle_circumference(n):
cc = 2 * 3.14 * n
return cc | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
36,265 | def square_area(n):
sa = n + n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | false | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
14,349 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
27,241 | def square_area(n):
sa = n * n
return sa | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 762404df-24ca-44ff-9c98-3f841fa7faab | 2,016 |
21,130 | def circle_circumference(radius):
result = 2 * 3.14 * radius
return result | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
18,300 | def circle_area(radius):
result = 3.14 * (radius * radius)
return result | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
11,099 | def rectangle_perimeter(length, height):
result = 2 * length + 2 * height
return result | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
11,730 | def square_area(side):
result = side * side
return result | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
25,243 | def circle_area(radius):
result = 3.14 * (radius * radius)
return result | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
16,140 | def circle_circumference(radius):
result = 2 * 3.14 * radius
return result | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
37,222 | def rectangle_perimeter(length, height):
result = 2 * length + 2 * height
return result | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
40,893 | def square_area(side):
result = side * side
return result | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
10,983 | def square_area(side):
result = side * side
return result | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
41,185 | def circle_area(radius):
result = 3.14 * (radius * radius)
return result | circle_area | circle_area | Return the area of a circle. | assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
26,454 | def square_perimeter(side):
result = side * 4
return result | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
11,512 | def square_perimeter(side):
result = side * 4
return result | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
12,192 | def rectangle_perimeter(length, height):
result = 2 * length + 2 * height
return result | rectangle_perimeter | rectangle_perimeter | Return the perimeter of a rectangle with the given coordinates. | assert rectangle_perimeter(0,0)==0 and rectangle_perimeter(7968917888512863576,-18677)==15937835777025689798 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
2,080 | def circle_circumference(radius):
result = 2 * 3.14 * radius
return result | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | d8aa4bbd-4524-4751-9dce-5cd1ea64d8cb | 2,016 |
12,938 | def square_area(n):
sq = n * n
return sq | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 2d5a247c-29b2-4cc2-a956-669a2206edc8 | 2,016 |
9,621 | def square_area(n):
sq = n * n
return sq | square_area | square_area | Return the area of a square. | assert square_area(0)==0 and square_area(21138)==446815044 | true | 2d5a247c-29b2-4cc2-a956-669a2206edc8 | 2,016 |
4,943 | def sort(a):
i = 0 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 058b18f6-cf34-4afc-8b4e-0f7705be27f0 | 2,016 |
20,535 | def sort(a):
i = 0
p = 0
while i < len(a):
if a[i] < a[p]:
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 058b18f6-cf34-4afc-8b4e-0f7705be27f0 | 2,016 |
33,789 | def sort(a):
i = 0
p = 0
while i < len(a):
if a[i] > a[p]:
tmp = a[i]
a[i] = a[p]
a[p] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 058b18f6-cf34-4afc-8b4e-0f7705be27f0 | 2,016 |
18,182 | def sort(a):
i = 0
p = 0
while i < len(a):
if a[i] < a[p]:
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 058b18f6-cf34-4afc-8b4e-0f7705be27f0 | 2,016 |
33,466 | def sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | ce889881-69dd-4396-aceb-e6f7dddc2c14 | 2,016 |
40,250 | def sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | c45598e5-3acc-4052-b18a-228b6bd842f6 | 2,016 |
12,736 | def sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | false | 9de68f60-663e-4929-b3e2-88948f90a669 | 2,016 |
12,556 | def sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 9de68f60-663e-4929-b3e2-88948f90a669 | 2,016 |
20,357 | def find_position_of_smallest(a, i):
tmp = i
while i < len(a):
if a[i] < a[tmp]:
tmp = i
i = i + 1
return tmp
def sort(a):
find_position_of_smallest(a, i)
a[0] = tmp | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | false | 18ee9049-5f05-43b2-ac53-518e3b23c3c3 | 2,016 |
10,558 | def sort(a):
i = 0
while i < len(a):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j = j + 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
i = i + 1 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | 3bb099c4-4248-4efd-bfe2-3c423b916ce0 | 2,016 |
8,441 | def sort(a):
i = 0 | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | true | d2330156-60dd-4aca-a925-9aa27e3edb48 | 2,016 |
25,547 | def find_position_of_smallest(a, i):
tmp = i
while i < len(a):
if a[i] < a[tmp]:
tmp = i
i = i + 1
return tmp
def sort(a):
find_position_of_smallest(a, i)
tmp = i
a[0] = tmp | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | false | 18ee9049-5f05-43b2-ac53-518e3b23c3c3 | 2,016 |
29,197 | def find_position_of_smallest(a, i):
tmp = i
while i < len(a):
if a[i] < a[tmp]:
tmp = i
i = i + 1
return tmp
def sort(a):
find_position_of_smallest(a, i)
i = tmp
a[0] = tmp | sort | sort | Sort a list by repeatedly moving the minimimum of the remaining sublist to the front. | assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None | false | 18ee9049-5f05-43b2-ac53-518e3b23c3c3 | 2,016 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.