source
stringclasses 1
value | version
stringclasses 1
value | module
stringclasses 43
values | function
stringclasses 307
values | input
stringlengths 3
496
| expected
stringlengths 0
40.5k
| signature
stringclasses 0
values |
|---|---|---|---|---|---|---|
cpython
|
cfcd524
|
turtle
|
RawTurtle._tracer
|
>>> dist = 2
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle._tracer
|
>>> for i in range(200):
... turtle.fd(dist)
... turtle.rt(90)
... dist += 2
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> tp = turtle.pos()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> tp
|
(0.00,0.00)
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.teleport(60)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.pos()
|
(60.00,0.00)
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.teleport(y=10)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.pos()
|
(60.00,10.00)
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.teleport(20, 30)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.teleport
|
>>> turtle.pos()
|
(20.00,30.00)
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.shape
|
>>> turtle.shape()
|
'arrow'
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.shape
|
>>> turtle.shape("turtle")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shape
|
>>> turtle.shape()
|
'turtle'
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapesize
|
>>> turtle.resizemode("user")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapesize
|
>>> turtle.shapesize(5, 5, 12)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapesize
|
>>> turtle.shapesize(outline=8)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shearfactor
|
>>> turtle.shape("circle")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shearfactor
|
>>> turtle.shapesize(5,2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shearfactor
|
>>> turtle.shearfactor(0.5)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shearfactor
|
>>> turtle.shearfactor()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shearfactor
|
>>> 0.5
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.shape("circle")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.shapesize(5, 2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.tiltangle()
|
0.0
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.tiltangle(45)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.tiltangle()
|
45.0
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.stamp()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.tiltangle(-45)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.tiltangle()
|
315.0
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.stamp()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tiltangle
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.shape("circle")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.shapesize(5,2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.tilt(30)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.tilt(30)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.tilt
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapetransform
|
>>> turtle.shape("square")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapetransform
|
>>> turtle.shapesize(4,2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapetransform
|
>>> turtle.shearfactor(-0.5)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.shapetransform
|
>>> turtle.shapetransform()
|
(4.0, -1.0, -0.0, 2.0)
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.get_shapepoly
|
>>> turtle.shape("square")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.get_shapepoly
|
>>> turtle.shapetransform(4, -1, 0, 2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.get_shapepoly
|
>>> turtle.get_shapepoly()
|
((50, -20), (30, 20), (-50, 20), (-30, -20))
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.stamp
|
>>> turtle.color("blue")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.stamp
|
>>> turtle.stamp()
|
13
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.stamp
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamp
|
>>> turtle.color("blue")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamp
|
>>> astamp = turtle.stamp()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamp
|
>>> turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamp
|
>>> turtle.clearstamp(astamp)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamps
|
>>> for i in range(8):
... turtle.stamp(); turtle.fd(30)
...
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamps
|
>>> turtle.clearstamps(2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamps
|
>>> turtle.clearstamps(-2)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.clearstamps
|
>>> turtle.clearstamps()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.filling
|
>>> turtle.begin_fill()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.filling
|
>>> if turtle.filling():
... turtle.pensize(5)
... else:
... turtle.pensize(3)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.fill
|
>>> turtle.color("black", "red")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.fill
|
>>> with turtle.fill():
... turtle.circle(60)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.begin_fill
|
>>> turtle.color("black", "red")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.begin_fill
|
>>> turtle.begin_fill()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.begin_fill
|
>>> turtle.circle(60)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.begin_fill
|
>>> turtle.end_fill()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.end_fill
|
>>> turtle.color("black", "red")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.end_fill
|
>>> turtle.begin_fill()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.end_fill
|
>>> turtle.circle(60)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.end_fill
|
>>> turtle.end_fill()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.dot
|
>>> turtle.dot()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.dot
|
>>> turtle.fd(50); turtle.dot(20, "blue"); turtle.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.write
|
>>> turtle.write('Home = ', True, align="center")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.write
|
>>> turtle.write((0,0), True)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.poly
|
>>> with turtle.poly():
... for side in range(3)
... turtle.forward(50)
... turtle.right(60)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.poly
|
>>> turtle.forward(100)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.begin_poly
|
>>> turtle.begin_poly()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.end_poly
|
>>> turtle.end_poly()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.get_poly
|
>>> p = turtle.get_poly()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.get_poly
|
>>> turtle.register_shape("myFavouriteShape", p)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.getscreen
|
>>> ts = turtle.getscreen()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.getscreen
|
>>> ts
|
<turtle.TurtleScreen object at 0x0106B770>
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.getscreen
|
>>> ts.bgcolor("pink")
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.getturtle
|
>>> pet = getturtle()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.getturtle
|
>>> pet.fd(50)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.getturtle
|
>>> pet
|
<turtle.Turtle object at 0x0187D810>
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.getturtle
|
>>> turtles()
|
[<turtle.Turtle object at 0x0187D810>]
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.onclick
|
>>> def turn(x, y):
... left(360)
...
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onclick
|
>>> onclick(turn) # Now clicking into the turtle will turn it.
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onclick
|
>>> onclick(None) # event-binding will be removed
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onrelease
|
>>> class MyTurtle(Turtle):
... def glow(self,x,y):
... self.fillcolor("red")
... def unglow(self,x,y):
... self.fillcolor("")
...
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onrelease
|
>>> joe = MyTurtle()
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onrelease
|
>>> joe.onclick(joe.glow)
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.onrelease
|
>>> joe.onrelease(joe.unglow)
|
Clicking on joe turns fillcolor red, unclicking turns it to
transparent.
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.ondrag
|
>>> turtle.ondrag(turtle.goto)
|
Subsequently clicking and dragging a Turtle will move it
across the screen thereby producing handdrawings (if pen is
down).
| null |
cpython
|
cfcd524
|
turtle
|
RawTurtle.undo
|
>>> for i in range(4):
... turtle.fd(50); turtle.lt(80)
...
| null |
|
cpython
|
cfcd524
|
turtle
|
RawTurtle.undo
|
>>> for i in range(8):
... turtle.undo()
...
| null |
|
cpython
|
cfcd524
|
turtle
|
_Screen.setup
|
>>> screen.setup (width=200, height=200, startx=0, starty=0)
|
sets window to 200x200 pixels, in upper left of screen
| null |
cpython
|
cfcd524
|
turtle
|
_Screen.setup
|
>>> screen.setup(width=.75, height=0.5, startx=None, starty=None)
|
sets window to 75% of screen by 50% of screen and centers
| null |
cpython
|
cfcd524
|
turtle
|
_Screen.title
|
>>> screen.title("Welcome to the turtle-zoo!")
| null |
|
cpython
|
cfcd524
|
turtle
|
_Screen.bye
|
>>> screen.bye()
| null |
|
cpython
|
cfcd524
|
turtle
|
_Screen.exitonclick
|
>>> screen.exitonclick()
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.