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
|
---|---|---|---|---|---|---|---|---|
17,222 | 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 | 712c50ed-0c17-44f1-a863-183f2d9a5e14 | 2,015 |
18,358 | 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 | 3e9f1e04-e9fd-4164-8fa5-c7feb1dcc1f5 | 2,015 |
19,042 | 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 | 6a42703e-da42-4824-8b83-b6f291ad71be | 2,015 |
10,126 | 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 | fac2ee37-8224-43e0-9c23-7cc249889343 | 2,015 |
31,107 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < a
else:
high = mid
assert q <= a[high]
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 | 6cbd9686-8a3c-4d12-8a1a-70c661732027 | 2,015 |
5,395 | 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 | 4e44ac28-c84a-43ee-9b95-c4270d7bb030 | 2,015 |
1,360 | 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 | 05f63619-1095-4d15-8436-1f0832a593bc | 2,015 |
8,781 | 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 | 45fe5d71-35bd-4b87-b28c-71b204939543 | 2,015 |
32,506 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < a
else:
high = mid
assert q <= a[high]
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 | fa2c47e6-9c25-4040-9985-e5ab62711be6 | 2,015 |
29,479 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | 4788f2f7-8b97-41a8-88ee-697183f85246 | 2,015 |
1,409 | 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 | 66e06699-d10a-47f1-a343-55edd72e95d2 | 2,015 |
40,542 | 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 | caddc359-e5b0-41d8-94ab-df712d5ea9ce | 2,015 |
9,352 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
if a[mid] < q:
low = low + 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 | f56d6cc3-92a7-49e7-aa07-2e1c83caaabe | 2,015 |
42,323 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (high + low) / 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 | 2eb2f93d-3491-4b0b-bad9-894c90595058 | 2,015 |
26,273 | def selection_sort(a):
i = 0
while i < len(a) - 1:
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j += 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
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 | b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782 | 2,015 |
24,002 | def selection_sort(a):
i = 0
while i < len(a) - 1:
p = i
j = i + 1
while j < len(a):
if a[j] < a[p]:
p = j
j += 1
tmp = a[p]
a[p] = a[i]
a[i] = tmp
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 | b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782 | 2,015 |
8,057 | 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 | 29883390-7aa0-4484-9f1e-6fd0c1c8c420 | 2,015 |
4,974 | 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 | 8d8fa15f-3f0d-4a69-849b-9b7da96123cd | 2,015 |
42,009 | def bsearch(a, q):
low = 0
high = len(a)
while high != low:
mid = (high + low) / 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 | ba8a7560-aac9-45ef-b6fd-730b60e73e8c | 2,015 |
33,026 | 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 | c0a5d565-4fbf-4274-85af-71162f38b8d4 | 2,015 |
12,519 | 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 | 051d024e-69b1-48d1-ba77-a6f2d97a48bc | 2,015 |
39,569 | 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 | 75a32f49-710d-463f-8fee-0ae9b91a3034 | 2,015 |
20,233 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | ac1dec5e-a5eb-4183-ba72-3b639e82db3c | 2,015 |
3,600 | def bsearch(a, q):
low = 0
high = len(a)
mid = len(a) / 2
while low < high:
if q > a[mid]:
low = mid + 1
else:
high = mid
mid = (low + high) / 2
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 | 41c113b8-6f57-4003-bed3-3587b2376170 | 2,015 |
13,532 | 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 | 07676427-a705-4cb7-a5ef-6a1c3c67c950 | 2,015 |
1,622 | 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 | f98e9d61-9e86-4fed-86db-3cf718c5962d | 2,015 |
28,794 | 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 | 93426de2-87e4-4c00-9910-de51627bd576 | 2,015 |
2,127 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | b13f3dba-a06b-4528-a4d8-c2ee1a5bb34d | 2,015 |
13,601 | 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 | 4b622395-1c2b-4a5d-ba03-c6e0e0ef2dd7 | 2,015 |
33,295 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | b3fb7be5-b8f9-4b08-be4d-66eb3fcb7782 | 2,015 |
23,314 | 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 | 2157ade0-6890-435b-8669-a884e3233bc7 | 2,015 |
20,667 | 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 | 61b5b70e-4e9d-424d-ba4b-cab01b8c205f | 2,015 |
9,715 | 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 | 9550e418-a019-49c2-a2e9-8322a300fb6f | 2,015 |
24,887 | 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 | daaef1e8-1fe4-4dc4-b002-6e89fad22a66 | 2,015 |
9,783 | 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 | 2f34a0ed-0d6a-447e-8e47-6a90f11d53a7 | 2,015 |
14,283 | 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 | 431d0ef6-9edd-464b-a5fa-cccf8b152f4e | 2,015 |
16,407 | 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 | f0b2f578-ae0f-4ddc-94e9-204708d09f37 | 2,015 |
12,196 | 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 | 652b3384-e559-46c5-81db-1bf2117db63b | 2,015 |
30,761 | 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 | true | 5cf0f5b5-a91e-4c33-8ac1-92aa868cd3b0 | 2,015 |
8,678 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | b0c92748-3b02-4340-a9d8-2ebe9a693531 | 2,015 |
24,312 | def bsearch(a, q):
low = 0
high = len(a)
i = 0
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 | 72de96bc-40bc-48ca-b1c3-91150748b31a | 2,015 |
1,856 | 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 | 68f143f9-a076-4b95-afe1-e3828c2d0f4e | 2,015 |
5,914 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (low + high) / 2
assert low <= mid < high
if a[mid] < q:
low = mid + 1
assert low == 0 or a[low - 1] < q
else:
high = mid
assert q <= a[high]
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 | 5a6b9af4-c978-4326-ba5b-405c4a284f15 | 2,015 |
37,931 | 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 | a2b86688-0a82-4779-8335-a584906257b0 | 2,015 |
7,897 | 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 | fc73b043-0c96-4ce3-8b8f-2c4c98785aa6 | 2,015 |
35,122 | def bsearch(a, q):
low = 0
high = len(a)
while low < high:
mid = (high + low) / 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 | f6343d5f-9ee0-441c-a67c-781ee180947e | 2,015 |
10,111 | def bsearch(a, q):
start = 0
end = len(a)
while end > start:
m = (start + end) / 2
if a[m] < q:
start = m + 1
else:
end = m
return start | 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 | 91bbbbbf-cad8-4507-9c4d-c7cfe0ebc210 | 2,015 |
982 | 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 | 6f8302a0-5974-4b36-a8e9-6b3968a8fce1 | 2,015 |
6,975 | 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 | 030c2a56-757a-4b4d-ac91-67aecc3d9b33 | 2,015 |
9,414 | 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 | 3d19e1db-d496-420c-b077-41631364e4f7 | 2,015 |
24,487 | def rectangle_perimeter(x1, y1, x2, y2):
perimeter = x1 + y1 + x2 + y2
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 | false | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
32,347 | 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 | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
23,555 | def circle_area(r):
area = r * r * 3.14
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 | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
8,950 | def rectangle_perimeter(x1, y1, x2, y2):
perimeter = x1 + y1 + x2 + y2
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 | false | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
11,452 | def square_perimeter(s):
return s * 4 | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
38,295 | def circle_circumference(r):
circumference = 2 * 3.14 * r
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 | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
29,659 | def square_perimeter(s):
return s * 4 | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
22,116 | def circle_circumference(r):
circumference = 2 * 3.14 * r
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 | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
1,880 | def circle_area(r):
area = r * r * 3.14
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 | 89186303-b7a8-4f4c-9627-06ba24e03bbb | 2,015 |
1,284 | 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 | 3bcffc16-908f-42c5-9ac3-f685ae6eca33 | 2,015 |
35,126 | 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 | 7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465 | 2,015 |
8,502 | 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 | 7b8e2d7b-1f3a-4e34-b02c-e6ac46baa465 | 2,015 |
20,112 | 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 | fa7e9f17-de07-4868-ab69-667438d7becd | 2,015 |
33,834 | 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 | 109505d5-be18-4a61-8318-5d522de4300e | 2,015 |
27,213 | 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 | 794362b7-cbcd-4bea-bafb-7967c266e248 | 2,015 |
24,170 | def bsearch(a, q):
high = len(a)
low = 0
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 | a49f3af8-fb92-43d5-945c-abc11916e319 | 2,015 |
21,434 | def double(n):
return 2 * n | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | a49f3af8-fb92-43d5-945c-abc11916e319 | 2,015 |
34,114 | def double(n):
return 2 * n | double | double | Double a number or a string. | assert double(0)==0 and double(-7601)==-15202 | true | a49f3af8-fb92-43d5-945c-abc11916e319 | 2,015 |
41,987 | def bsearch(a, q):
start = 0
end = len(a)
while start < end:
middle = (start + end) / 2
if a[middle] < q:
start = middle + 1
else:
end = middle
return start | 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 | a72d6534-1b96-4a41-95a5-f71f23e2bd99 | 2,015 |
18,354 | 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 | f5dc8223-cf9e-429f-aae8-350d82da1982 | 2,015 |
32,545 | 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 | f5dc8223-cf9e-429f-aae8-350d82da1982 | 2,015 |
18,264 | def reverse(a):
import sys
a = sys.stdin.readlines()
i = 0
b = []
while i < len(a):
f = a[len(a) - i - 1]
i = i + 1
b.append(f.rstrip())
print(b)
return a | reverse_iter | reverse | Iteratively reverse a list of elements. | assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto'] | false | 2b978ca4-e1a6-4660-9bf9-39da09a92282 | 2,015 |
30,828 | def reverse(a):
import sys
a = sys.stdin.readlines()
i = 0
b = []
while i < len(a):
f = a[len(a) - i - 1]
i = i + 1
b.append(f.rstrip())
print(b)
return a | reverse_iter | reverse | Iteratively reverse a list of elements. | assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto'] | false | 2b978ca4-e1a6-4660-9bf9-39da09a92282 | 2,015 |
14,067 | def square_area(side):
x = side * side
return x | 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,015 |
23,527 | def square_area(side):
x = side * side
return x | 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,015 |
27,217 | def circle_area(radius):
x = 3.14 * (radius * radius)
return 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 | ead2ade9-6c50-44a4-98f3-1d781d45a0f5 | 2,015 |
21,368 | def circle_circumference(radius):
x = 2 * 3.14 * radius
return x | circle_circumference | circle_circumference | Return the circumference of a circle. | assert circle_circumference(0)==0.0 and circle_circumference(25619)==160887.32 | true | ead2ade9-6c50-44a4-98f3-1d781d45a0f5 | 2,015 |
37,488 | def rectangle_perimeter(l, b):
x = l * 2 + b * 2
return x | 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 | ead2ade9-6c50-44a4-98f3-1d781d45a0f5 | 2,015 |
41,356 | def square_perimeter(side):
x = side + side + side + side
return x | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | ead2ade9-6c50-44a4-98f3-1d781d45a0f5 | 2,015 |
25,992 | 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 | 46954879-c4e4-4ce6-87d4-00184c62b522 | 2,015 |
13,890 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
38,601 | 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 | 6ae36e81-5a79-4a87-a484-a86635591a14 | 2,015 |
3,073 | def square_perimeter(side):
return side * 4 | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
24,015 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
33,580 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
2,082 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
41,201 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
40,080 | def square_perimeter(side):
return side * 4 | square_perimeter | square_perimeter | Returns the perimeter of a square. | assert square_perimeter(0)==0 and square_perimeter(-12684)==-50736 | true | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
2,959 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
945 | def rectangle_perimeter(l, h):
return 2 * h + 2 * l | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
37,405 | def rectangle_perimeter(l, h):
return 2 * h + 2 * l | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
5,280 | 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 | 0fe97cdd-5534-49d7-8452-aaf0faff48ad | 2,015 |
2,071 | def reverse(a):
b = []
i = 0
while i < len(a):
b.append(a[len(a) - 1 - i])
i = i + 1
return b | reverse_iter | reverse | Iteratively reverse a list of elements. | assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto'] | true | ead2ade9-6c50-44a4-98f3-1d781d45a0f5 | 2,015 |
37,726 | 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 | 3bcffc16-908f-42c5-9ac3-f685ae6eca33 | 2,015 |
30,736 | 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 | 3bcffc16-908f-42c5-9ac3-f685ae6eca33 | 2,015 |
22,110 | def reverse(a):
i = len(a) - 1
b = []
while i >= 0:
b.append(a[i])
i -= 1
return b | reverse_iter | reverse | Iteratively reverse a list of elements. | assert reverse([])==[] and reverse([20, 10, 0, -10, -20])==[-20, -10, 0, 10, 20] and reverse(['toto', True, [10, 0, 9], 12.8, 6])==[6, 12.8, [10, 0, 9], True, 'toto'] | true | 7761b9ac-f093-487b-8401-cf2d01636e78 | 2,015 |
31,388 | 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 |
35,198 | def rectangle_perimeter(l, w):
peri = l + w + l + w
return peri | 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 | dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa | 2,015 |
21,853 | def rectangle_perimeter(l, w):
peri = l + w + l + w
return peri | 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 | dc8a6a6b-b7c8-4aaf-8447-f5f1b92f7daa | 2,015 |
90 | 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 |