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
|
---|---|---|---|---|---|---|---|---|
35,387 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = (x2 - x1 + (y2 - y1)) ** 0.5 / 2
radii = r1 + r2
print((distance, radii))
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
13,447 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
print((distance, radii))
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
19,410 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 <= (R0 + R1) ** 2:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
5,963 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if (R0 - R1) ** 2 <= (x0 - x1) ** 2 + (y0 - y1) ** 2 < (R0 + R1) ** 2:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
32,983 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
35,233 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
return distance > radii
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
26,855 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
return distance < radii
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
927 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
return distance < radii
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
24,111 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
30,498 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
8,348 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
30,759 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 + x1 + (y0 + y1) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
15,200 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if R0 - R1 <= x0 - x1 + (y0 - y1) or x0 - x1 + (y0 - y1) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
20,554 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
10,518 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if R0 - R1 <= x0 - x1 + (y0 - y1) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
11,770 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
23,173 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
3,314 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
17,004 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) <= R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
4,732 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
6,704 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
9,278 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
rad = (r1 + r2) ** 2
xs = (x1 - x2) ** 2
ys = (y1 - y2) ** 2
both_x_y = xs + ys
if rad > both_x_y:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
11,337 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
rad = (r1 + r2) ** 2
xs = (x1 - x2) ** 2
ys = (y1 - y2) ** 2
both_x_y = xs + ys
if rad > both_x_y:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
2,685 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,016 |
6,797 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
2,974 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = A
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
except KeyError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
35,902 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
try:
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
except KeyError:
print(True)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
33,800 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = A
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
except TypeError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
25,340 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
try:
overlap = False
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
except TypeError:
print(True)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
16,296 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = A
if math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) < R0 + R1:
overlap = True
return overlap
except TypeError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
10,867 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
x = (x2 - x1) ** 2
y = (y2 - y1) ** 2
distance = sqrt(x + y)
if r1 + r2 - 1 == distance or abs(r1 - r2) == distance:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0473ca8a-3862-4046-a34c-16eb754fdfff
| 2,016 |
32,181 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = A
if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2
) < int(R0) + int(R1):
overlap = True
return overlap
except TypeError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
40,517 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
x = (x2 - x1) ** 2
y = (y2 - y1) ** 2
distance = sqrt(x + y)
return r1 + r2 < distance
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0473ca8a-3862-4046-a34c-16eb754fdfff
| 2,016 |
10,369 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
32,683 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = True
if math.sqrt((int(x0) - int(x1)) ** 2 + (int(y0) - int(y1)) ** 2
) < int(R0) + int(R1):
overlap = A
return overlap
except TypeError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
36,741 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
x = (x2 - x1) ** 2
y = (y2 - y1) ** 2
distance = sqrt(x + y)
return r1 + r2 > distance
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0473ca8a-3862-4046-a34c-16eb754fdfff
| 2,016 |
29,613 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
x = (x2 - x1) ** 2
y = (y2 - y1) ** 2
distance = sqrt(x + y)
return r1 + r2 > distance
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0473ca8a-3862-4046-a34c-16eb754fdfff
| 2,016 |
24,964 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
A = False
try:
overlap = A
if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2
) < int(R0) + int(R1):
overlap = True
return overlap
except TypeError:
print(A)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
31,077 |
def overlap(x0=0, y0=0, R0=1, x1=0, y1=0, R1=1):
try:
overlap = False
if math.sqrt((int(x1) - int(x0)) ** 2 + (int(y1) - int(y0)) ** 2
) < int(R0) + int(R1):
overlap = True
return overlap
except TypeError:
pass
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
4,300 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
5,154 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
21,678 |
def append2list(l1, l2=[]):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
f69c7616-4d20-4dbe-b3f8-0d10db7adfe4
| 2,016 |
33,584 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
try:
overlap = False
if math.sqrt((x1 - x0) ** 2 + (y1 - y0) ** 2) < R0 + R1:
overlap = True
return overlap
except TypeError:
pass
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
30,421 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
try:
overlap = False
if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:
overlap = True
return overlap
except TypeError:
pass
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
36,484 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
try:
overlap = False
if math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) < r1 + r2:
overlap = True
return overlap
except TypeError:
pass
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
6ae36e81-5a79-4a87-a484-a86635591a14
| 2,016 |
2,328 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
overlap = False
if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,016 |
21,653 |
def append2list(l1, l2=[]):
empty = []
for i in l2:
empty.append(i)
for i in l1:
empty.append(i)
return empty
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
e36ebdf2-7cd7-440f-af8b-386d6e2d920f
| 2,016 |
18,219 |
def append2list(l1, l2=[]):
empty = []
for i in l2:
empty.append(i)
for i in l1:
empty.append(i)
return empty
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
e36ebdf2-7cd7-440f-af8b-386d6e2d920f
| 2,016 |
19,627 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
overlap = False
if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,016 |
32,717 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
overlap = False
if math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) < r1 + r2:
overlap = True
return overlap
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
0f49aa06-8917-4312-903b-8a4431682b21
| 2,016 |
19,142 |
def append2list(l1, l2=[][:]):
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
d566071f-0679-42ce-9081-3fac29a67d21
| 2,016 |
4,028 |
def append2list(l1, l2=[][:]):
return l1 + l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| false |
d566071f-0679-42ce-9081-3fac29a67d21
| 2,016 |
42,409 |
def append2list(l1, l2=[][:]):
return l2 + l1
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
d566071f-0679-42ce-9081-3fac29a67d21
| 2,016 |
30,114 |
def append2list(l1, l2=[][:]):
return l2 + l1
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
d566071f-0679-42ce-9081-3fac29a67d21
| 2,016 |
14,635 |
def append2list(l1, l2=[][:]):
return l2 + l1
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
d566071f-0679-42ce-9081-3fac29a67d21
| 2,016 |
36,474 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 / 2)
circles = r1 + r2
if distance < circles:
print(True)
else:
print(False)
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
e5db5e57-0261-4967-963a-42d1a98c03de
| 2,016 |
35,704 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 / 2)
circles = r1 + r2
if distance < circles:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
e5db5e57-0261-4967-963a-42d1a98c03de
| 2,016 |
37,044 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** (1 / 2)
circles = r1 + r2
if distance < circles:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
e5db5e57-0261-4967-963a-42d1a98c03de
| 2,016 |
39,021 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = (x1 - x2) ** 2 + (y1 - y2) ** 2
if (r1 + r2) ** 2 > distance:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
e36ebdf2-7cd7-440f-af8b-386d6e2d920f
| 2,016 |
23,042 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = (x1 - x2) ** 2 + (y1 - y2) ** 2
if (r1 + r2) ** 2 > distance:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
e36ebdf2-7cd7-440f-af8b-386d6e2d920f
| 2,016 |
10,110 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
rpos = r1 + r2 - 1
rneg = r1 - r2
if d == rpos:
return True
elif d == rneg:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| false |
8d8fa15f-3f0d-4a69-849b-9b7da96123cd
| 2,016 |
36,408 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
rpos = r1 + r2
return d < rpos
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
8d8fa15f-3f0d-4a69-849b-9b7da96123cd
| 2,016 |
26,113 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
d = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
rpos = r1 + r2
return d < rpos
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
8d8fa15f-3f0d-4a69-849b-9b7da96123cd
| 2,016 |
19,773 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
return distance < radii
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
18,275 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
radii = r1 + r2
return distance < radii
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
31,974 |
def append2list(l1, l2=[]):
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
33,366 |
def append2list(l1, l2=None):
if not l2:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
9,663 |
def append2list(l1, l2=None):
if not l2:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
16,410 |
def append2list(l1, l2=None):
if not l2:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
daaef1e8-1fe4-4dc4-b002-6e89fad22a66
| 2,016 |
4,228 |
def append2list(l1, l2=None):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
5,352 |
def append2list(l1, l2=None):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
31,867 |
def append2list(l1, l2=None):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
caddc359-e5b0-41d8-94ab-df712d5ea9ce
| 2,016 |
18,247 |
def append2list(l1, l2=None):
if l2 is None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,016 |
39,751 |
def append2list(l1, l2=None):
if l2 is None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,016 |
25,664 |
def append2list(l1, l2=None):
if l2 is None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
9675c8b9-337a-4fd1-bb8f-8e3510c7f703
| 2,016 |
6,038 |
def append2list(l1, l2=None):
if l2 is None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
9675c8b9-337a-4fd1-bb8f-8e3510c7f703
| 2,016 |
9,549 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
if dis < r1 + r2:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
9675c8b9-337a-4fd1-bb8f-8e3510c7f703
| 2,016 |
31,876 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
dis = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
if dis < r1 + r2:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
9675c8b9-337a-4fd1-bb8f-8e3510c7f703
| 2,016 |
14,924 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
if float(r1) > distance - r2 and float(r2) > distance - r1:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,016 |
28,580 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
if float(r1) > distance - r2 and float(r2) > distance - r1:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,016 |
36,445 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
distance = ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
if float(r1) > distance - r2 and float(r2) > distance - r1:
return True
else:
return False
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
6668ebd6-a850-4666-b8cc-5c934a67601a
| 2,016 |
3,267 |
def append2list(l1, l2=None):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
45fe5d71-35bd-4b87-b28c-71b204939543
| 2,016 |
3,682 |
def append2list(l1, l2=None):
if l2 == None:
l2 = []
for i in l1:
l2.append(i)
return l2
|
append2list
|
append2list
|
Appends elements of a list l1 at the end of the list l2. If l2 not supplied default to empty list.
|
assert append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866],[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866])==[-16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866, -16276, 117, -12248, -4743, -25, -6030600119498841921, -8866, -12248, -4743, -25, -6030600119498841921, -8866] and append2list([-21267],[-21267, -21267])==[-21267, -21267, -21267]
| true |
45fe5d71-35bd-4b87-b28c-71b204939543
| 2,016 |
980 |
def merge_lists(l1, l2):
l3 = []
i = 0
while i < len(l1):
l3.append(l1[i])
i += 2
i = 0
while i < len(l2):
l3.append(l2[i])
i += 2
return l3
|
merge_lists
|
merge_lists
|
Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.
|
assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
24,069 |
def weird_case(some_str):
new_str = ''
i = 0
lc = 0
while i < len(some_str):
if some_str[i].isalpha():
if lc % 2 == 0:
new_str += some_str[i].upper()
else:
new_str += some_str[i].lower()
lc += 1
else:
new_str += some_str[i]
i = i + 1
return new_str
|
weird_case
|
weird_case
|
Takes a string some_str and contains a new string which is the same as some_str but the case alternates between upper and lower.
|
assert weird_case('au0x6')==Au0X6 and weird_case('F:BnJ')==F:bNj
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
26,705 |
def remove_zeros(list):
while 0 in list:
list.remove(0)
|
remove_zeros
|
remove_zeros
|
Take a list of numbers and removes the zeros from it.
|
assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
11,312 |
def merge_lists(l1, l2):
l3 = []
i = 0
while i < len(l1):
l3.append(l1[i])
i += 1
i = 0
while i < len(l2):
l3.append(l2[i])
i += 1
return l3
|
merge_lists
|
merge_lists
|
Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.
|
assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
23,781 |
def remove_zeros(list):
while 0 in list:
list.remove(0)
|
remove_zeros
|
remove_zeros
|
Take a list of numbers and removes the zeros from it.
|
assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
30,921 |
def weird_case(some_str):
new_str = ''
i = 0
lc = 0
while i < len(some_str):
if some_str[i].isalpha():
if lc % 2 == 0:
new_str += some_str[i].upper()
else:
new_str += some_str[i].lower()
lc += 1
else:
new_str += some_str[i]
i = i + 1
return new_str
|
weird_case
|
weird_case
|
Takes a string some_str and contains a new string which is the same as some_str but the case alternates between upper and lower.
|
assert weird_case('au0x6')==Au0X6 and weird_case('F:BnJ')==F:bNj
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
40,135 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
return dist < r1 + r2
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
45fe5d71-35bd-4b87-b28c-71b204939543
| 2,016 |
15,415 |
def overlap(x1=0, y1=0, r1=1, x2=0, y2=0, r2=1):
dist = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
return dist < r1 + r2
|
overlap
|
overlap
|
Test if two circles overlap.
|
assert overlap(12,-6058,21436,-3483096651887624530,24,31017)==False and overlap(-30592,-26624,-11905,1,2,30134)==False and overlap(0,0,0,0,0,0)==False and overlap(5128,-8635,-28938,25,-31295,-21637807133189218411179185993653430151)==False and overlap(-16348,-2218,2871,-15155,-83,24475)==True and overlap(4807,1216206119,8753907074291481720,-19844,-26061,-15639)==True and overlap(1348593950,19232,-10923,20,2259187900768772679,-5343103208648864320)==False and overlap(8410739119977124611,9995,83,8410739119977124611,19348,21604)==True
| true |
45fe5d71-35bd-4b87-b28c-71b204939543
| 2,016 |
23,219 |
def merge_lists(l1, l2):
l3 = []
i = 0
while i < len(l1):
l3.append(l1[i])
i += 2
i = 0
while i < len(l2):
l3.append(l2[i])
i += 2
return l3
|
merge_lists
|
merge_lists
|
Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.
|
assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
4,025 |
def remove_zeros(list):
while 0 in list:
list.remove(0)
|
remove_zeros
|
remove_zeros
|
Take a list of numbers and removes the zeros from it.
|
assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
17,565 |
def weird_case(some_str):
new_str = ''
i = 0
lc = 0
while i < len(some_str):
if some_str[i].isalpha():
if lc % 2 == 0:
new_str += some_str[i].upper()
else:
new_str += some_str[i].lower()
lc += 1
else:
new_str += some_str[i]
i = i + 1
return new_str
|
weird_case
|
weird_case
|
Takes a string some_str and contains a new string which is the same as some_str but the case alternates between upper and lower.
|
assert weird_case('au0x6')==Au0X6 and weird_case('F:BnJ')==F:bNj
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
3,396 |
def merge_lists(l1, l2):
l3 = []
i = 0
while i < len(l1):
l3.append(l1[i])
i += 2
i = 0
while i < len(l2):
l3.append(l2[i])
i += 2
return l3
|
merge_lists
|
merge_lists
|
Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.
|
assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
17,941 |
def weird_case(some_str):
new_str = ''
i = 0
lc = 0
while i < len(some_str):
if some_str[i].isalpha():
if lc % 2 == 0:
new_str += some_str[i].upper()
else:
new_str += some_str[i].lower()
lc += 1
else:
new_str += some_str[i]
i = i + 1
return new_str
|
weird_case
|
weird_case
|
Takes a string some_str and contains a new string which is the same as some_str but the case alternates between upper and lower.
|
assert weird_case('au0x6')==Au0X6 and weird_case('F:BnJ')==F:bNj
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
4,569 |
def merge_lists(l1, l2):
l3 = []
i = 0
while i < len(l1):
l3.append(l1[i])
i += 2
i = 0
while i < len(l2):
l3.append(l2[i])
i += 2
return l3
|
merge_lists
|
merge_lists
|
Take two lists l1 and l2 and return a third list which contains every second element of l1 and l2.
|
assert merge_lists([],[])==[] and merge_lists([],[1, 2, 3, 4])==[1, 3] and merge_lists([1, 2, 3, 4],[])==[1, 3] and merge_lists([10, 20, 45, 2, -10987, 89165],[9, 0, -6754, 5625264, 8765])==[10, 45, -10987, 9, -6754, 8765]
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
31,431 |
def remove_zeros(list):
while 0 in list:
list.remove(0)
|
remove_zeros
|
remove_zeros
|
Take a list of numbers and removes the zeros from it.
|
assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
42,389 |
def remove_zeros(list):
while 0 in list:
list.remove(0)
|
remove_zeros
|
remove_zeros
|
Take a list of numbers and removes the zeros from it.
|
assert remove_zeros([])==None and remove_zeros([])==None and remove_zeros([5202, -24344, -6528])==None and remove_zeros([5202, -24344, -6528])==None
| true |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
5,400 |
def weird_case(some_str):
new_str = ''
i = 0
lc = 0
while i < len(some_str):
if some_str[i].isalpha():
if lc % 2 == 0:
new_str += some_str[i].upper()
else:
new_str += some_str[i].lower()
lc += 1
else:
new_str += some_str[i]
i = i + 1
return new_str
|
weird_case
|
weird_case
|
Takes a string some_str and contains a new string which is the same as some_str but the case alternates between upper and lower.
|
assert weird_case('au0x6')==Au0X6 and weird_case('F:BnJ')==F:bNj
| false |
94e64aae-7bb0-45bd-8969-e98b17d0a3da
| 2,016 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.