Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Python turtle basics
- # Links used https://docs.python.org/3/library/turtle.html#
- # https://www.w3schools.com/colors/colors_names.asp
- # https://html-color.codes/
- import turtle # imports the Turtle Library
- wn = turtle.Screen() # makes the window
- wn.bgcolor("#76ff7a")
- bob = turtle.Turtle()
- bob.color("darkblue")
- bob.penup()
- bob.goto(50,50) # go to x pos by 50 and 5 pos
- bob.pendown()
- bob.pensize(3)
- bob.begin_fill()
- for i in range(3): # loop three times
- bob.fd(160)
- bob.lt(120) # 360 /3 = 120
- bob.end_fill()
- wn.exitonclick()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement