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
|
---|---|---|---|---|---|---|---|---|
23,342 |
def circle_area(r):
circ = r * r * 3.14
return circ
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
32,327 |
def square_area(side):
area = side * side
return area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
10,402 |
def square_perimeter(a):
total = a + a + a + a
return total
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
589 |
def square_perimeter(a):
total = a + a + a + a
return total
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
1,408 |
def circle_area(r):
circ = r * r * 3.14
return circ
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
26,759 |
def square_area(side):
area = side * side
return area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
28,861 |
def circle_circumference(x):
circum = 2 * (x * 3.14)
return circum
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa
| 2,015 |
24,447 |
def square_perimeter(b):
return b * 4
def square_area(a):
return a * a
def square_perimeter(b):
return b * 4
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
19,662 |
def square_perimeter(b):
return b * 4
def square_area(a):
return a * a
def square_perimeter(b):
return b * 4
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
32,689 |
def circle_area(radius1):
return 3.14 * radius1 * radius1
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| false |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
33,159 |
def rectangle_perimeter(side1, side2):
return side1 * 2 + side2 * 2
|
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 |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
19,004 |
def square_perimeter(b):
return b * 4
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
12,967 |
def rectangle_perimeter(side1, side2):
return side1 * 2 + side2 * 2
|
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 |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
5,114 |
def circle_area(radius1):
return 3.14 * radius1 * radius1
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| false |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
32,200 |
def square_perimeter(b):
return b * 4
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
20,441 |
def circle_circumference(radius):
return 2 * 3.14 * radius
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
16,377 |
def circle_circumference(radius):
return 2 * 3.14 * radius
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
b69e2427-8f89-4880-8245-6f14d4d2354a
| 2,015 |
41,040 |
def double(x):
return x * 2
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,015 |
31,542 |
def area(x):
return 3.141 * x ** 2
|
area
|
area
|
Return the area of a circle with the given coordinates.
|
assert area(0)==0.0 and area(-14329)==644910876.981
| true |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,015 |
20,586 |
def circumference(x):
return 2 * 3.141 * x
|
circumference
|
circumference
|
Return the circumference of a circle.
|
assert circumference(0)==0.0 and circumference(-23091)==-145057.662
| true |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,015 |
8,336 |
def double(x):
return x * 2
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
8fca450a-2117-453b-8f1b-f55a98c9bdb9
| 2,015 |
35,586 |
def swap(a, i, p):
tmp = a[i]
a[i] = a[p]
a[p] = tmp
def findsmall(a, i):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j += 1
return p
def selection_sort(a):
i = 0
while i < len(a):
p = findsmall(a, i)
swap(a, i, p)
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 |
431d0ef6-9edd-464b-a5fa-cccf8b152f4e
| 2,015 |
23,196 |
def swap(a, i, p):
tmp = a[i]
a[i] = a[p]
a[p] = tmp
def findsmall(a, i):
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j += 1
return p
def selection_sort(a):
i = 0
while i < len(a):
p = findsmall(a, i)
swap(a, i, p)
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 |
431d0ef6-9edd-464b-a5fa-cccf8b152f4e
| 2,015 |
38,902 |
def double(n):
return n * 2
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
39,152 |
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 |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
39,486 |
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 |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
14,815 |
def reverse(a):
n = len(a)
i = 0
while i < n / 2:
tmp = a[i]
a[i] = a[len(a) - i - 1]
a[len(a) - i - 1] = tmp
i = i + 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 |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
18,400 |
def selection_sort(a):
i = 0
n = len(a)
while i < n:
p = i
j = i + 1
while j < n:
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]
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
24,685 |
def selection_sort(a):
i = 0
n = len(a)
while i < n:
p = i
j = i + 1
while j < n:
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]
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,015 |
15,245 |
def double(n):
return 2 * n
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
d2e09b87-6673-4e12-97a7-4a861a6daa84
| 2,015 |
501 |
def double(n):
return 2 * n
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
d2e09b87-6673-4e12-97a7-4a861a6daa84
| 2,015 |
26,897 |
def double(x):
y = x * 2
return y
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
16,534 |
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 += 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 |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
8,355 |
def circumference(r):
y = 2 * pi * r
return y
|
circumference
|
circumference
|
Return the circumference of a circle.
|
assert circumference(0)==0.0 and circumference(-23091)==-145057.662
| false |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
17,769 |
def area(r):
y = pi * r * r
return y
|
area
|
area
|
Return the area of a circle with the given coordinates.
|
assert area(0)==0.0 and area(-14329)==644910876.981
| false |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
26,285 |
def double(n):
return n * 2
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465
| 2,015 |
41,475 |
def double(n):
return n * 2
|
double
|
double
|
Double a number or a string.
|
assert double(0)==0 and double(-7601)==-15202
| true |
7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465
| 2,015 |
42,089 |
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 |
7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465
| 2,015 |
13,522 |
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 |
7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465
| 2,015 |
35,292 |
def selection_sort(a):
i = 0
j = 1
while j < len(a):
if a[j] < a[i]:
tmp = a[j]
a[j] = a[i]
a[i] = tmp
if i != 0:
i -= 1
j -= 1
else:
i += 1
j += 1
|
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 |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
40,998 |
def selection_sort(a):
i = 0
j = 1
while j < len(a):
if a[j] < a[i]:
tmp = a[j]
a[j] = a[i]
a[i] = tmp
if i != 0:
i -= 1
j -= 1
else:
i += 1
j += 1
|
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 |
3328e1f8-ae85-4d26-8d1c-386e7e2467dc
| 2,015 |
17,911 |
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 |
9a05c20e-2fde-40c1-948b-649e25b30e6e
| 2,015 |
40,609 |
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 |
9a05c20e-2fde-40c1-948b-649e25b30e6e
| 2,015 |
38,706 |
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 |
9a05c20e-2fde-40c1-948b-649e25b30e6e
| 2,015 |
39,203 |
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 |
9a05c20e-2fde-40c1-948b-649e25b30e6e
| 2,015 |
16,271 |
def square_area(side):
return side * side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
37,341 |
def square_area(x):
return x * x
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
9,741 |
def square_area(n):
area = n * n
return area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
1bdd9f47-4a26-4f0c-ae56-413531e3f59b
| 2,016 |
35,461 |
def square_area(side):
sq = side * side
return sq
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
ead2ade9-6c50-44a4-98f3-1d781d45a0f5
| 2,016 |
10 |
def square_area(n):
side = n * n
return side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
17,628 |
def square_area(side):
sq = side * side
return sq
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
80965c2d-45d9-440d-b3c3-403c112145e9
| 2,016 |
38,501 |
def square_area(a):
return a * a
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
52070898-b2dd-4882-a9a9-65bd9d55725a
| 2,016 |
2,738 |
def square_area(n):
ans = n * n
return ans
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
e787ded7-43af-4b69-82c1-c646ab388711
| 2,016 |
34,896 |
def square_area(n):
return n * n
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
329aa290-1bfb-4cf3-82e0-ca13ee54db0f
| 2,016 |
3,807 |
def square_area(n):
n = n * n
return n
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
73cbe3a2-8a2b-4c7f-8b9e-a7db4b1d6f36
| 2,016 |
29,840 |
def square_area(l):
return l * l
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
44c97823-e1ac-4434-b296-79fbeb51fa5a
| 2,016 |
35,977 |
def square_area(x):
area = x * x
return area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
813b8c22-4514-4fed-ac48-d5a7a4b068dd
| 2,016 |
18,520 |
def square_area(x):
area = x * x
return area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
813b8c22-4514-4fed-ac48-d5a7a4b068dd
| 2,016 |
24,222 |
def square_area(side):
return side * side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
106d34e0-d03c-42ab-a67a-b88759ff6307
| 2,016 |
18,801 |
def square_area(n):
side = n * n
return side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
e61abe18-8ddf-4e11-ab3b-38a68f156ea0
| 2,016 |
15,542 |
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 |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
22,517 |
def square_area(l):
return l * l
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
3db8d602-4800-4b13-9482-3fb9643a4588
| 2,016 |
33,721 |
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 |
41abe035-c2cd-41c3-ba39-497868b0334d
| 2,016 |
18,691 |
def square_area(n):
return n * n
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
b8085080-0ead-4e7d-88a1-f66d565aea2e
| 2,016 |
11,098 |
def square_area(side):
sq = side * side
return sq
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
fc19956d-3237-43b9-841d-e5882c3359f1
| 2,016 |
14,239 |
def square_area(x1, y1, x2, y2):
dx = x1 - x2
dy = y1 - y2
area = dx * dy
if 0 <= area:
return area
else:
return -area
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| false |
77d2e8c4-7a6c-4b2b-a2c4-40bb9700563f
| 2,016 |
5,785 |
def rectangle_perimeter(a, b):
return 2 * a + 2 * b
|
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 |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
23,880 |
def square_area(side):
return side * side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
30,647 |
def square_area(side):
return side * side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
9,765 |
def circle_circumference(r):
return 2 * pi * r
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| false |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
12,273 |
def circle_area(r):
return pi * r * r
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| false |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
38,304 |
def circle_area(r):
return pi * r * r
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| false |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
16,269 |
def circle_circumference(r):
return 2 * pi * r
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| false |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
26,295 |
def rectangle_perimeter(a, b):
return 2 * a + 2 * b
|
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 |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
34,740 |
def rectangle_perimeter(a, b):
return 2 * a + 2 * b
def square_perimeter(n):
return rectangle_perimeter(n, n)
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
24,853 |
def rectangle_perimeter(a, b):
return 2 * a + 2 * b
def square_perimeter(n):
return rectangle_perimeter(n, n)
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
df8dd1dd-a7c8-46c0-b89f-ec170a81f08a
| 2,016 |
23,009 |
def square_area(n):
return n * n
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
2bcea2a1-925b-4db5-8403-2d8af9d0bb46
| 2,016 |
2,226 |
def square_area(side):
sq = side * side
return sq
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
52d6165d-a6ff-4d05-9d24-6b0105a2b16c
| 2,016 |
16,346 |
def rectangle_perimeter(x, y):
return x + x + y + y
|
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 |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
39,783 |
def square_perimeter(x):
return x * 4
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
38,348 |
def square_area(x):
return x * x
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
12,343 |
def square_perimeter(x):
return x * 4
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
7,462 |
def square_area(x):
return x * x
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
41,036 |
def circle_circumference(x):
return 2 * 3.14 * x
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
31,760 |
def circle_area(x):
return 3.14 * (x * x)
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
35,567 |
def rectangle_perimeter(x, y):
return x + x + y + y
|
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 |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
28,561 |
def circle_circumference(x):
return 2 * 3.14 * x
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
4,087 |
def circle_area(x):
return 3.14 * (x * x)
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
aaa0b462-c89e-49f8-8886-ec2961496a19
| 2,016 |
20,274 |
def square_perimeter(j):
perimeter = j + j + j + j
return perimeter
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
1,700 |
def circle_area(k):
area = 3.14 * (k * k)
return area
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
5,671 |
def rectangle_perimeter(l, h):
perimeter = l + l + h + h
return perimeter
|
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 |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
28,871 |
def square_area(n):
side = n * n
return side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
79 |
def circle_circumference(m):
circumference = 2 * 3.14 * m
return circumference
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
08b41ad4-ecde-43b9-b629-6ff77ac435fc
| 2,016 |
22,227 |
def circle_circumference(m):
circumference = 2 * 3.14 * m
return circumference
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
4,214 |
def circle_area(i):
area = 3.14 * (i * i)
return area
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
17,309 |
def square_area(n):
side = n * n
return side
|
square_area
|
square_area
|
Return the area of a square.
|
assert square_area(0)==0 and square_area(21138)==446815044
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
28,176 |
def square_perimeter(j):
per = j * 4
return per
|
square_perimeter
|
square_perimeter
|
Returns the perimeter of a square.
|
assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
39,402 |
def circle_circumference(m):
circumference = 2 * 3.14 * m
return circumference
|
circle_circumference
|
circle_circumference
|
Return the circumference of a circle.
|
assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
11,474 |
def rectangle_perimeter(a, b):
rper = 2 * a + 2 * b
return rper
|
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 |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
13,314 |
def circle_area(i):
area = 3.14 * (i * i)
return area
|
circle_area
|
circle_area
|
Return the area of a circle.
|
assert circle_area(0)==0.0 and circle_area(-1160877629)==4.231579770269758e+18
| true |
8ed5ee6f-d6e7-4caf-8917-36bbe373ffac
| 2,016 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.