dot
Draw a filled dot of this size.
dot(20)Example
dot(30)
hideturtle()
Python functions and events · In any playground, open Reference to copy these.
Draw a filled dot of this size.
dot(20)dot(30)
hideturtle()
Name a group of steps, then run it by calling its name.
def shape():
pass
shape()def zigzag():
left(45)
forward(30)
right(90)
forward(30)
left(45)
zigzag()
zigzag()
zigzag()
Work through a list, one item at a time.
for c in colours:
passpensize(6)
for c in ["red", "blue", "green"]:
pencolor(c)
forward(40)
Show text or a value in the output box.
print("Hello")True if the item is in the list (or the key is in the dictionary, or the letters are in the text).
if item in bag:
pass