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() # open the drawing window
- wn.bgcolor("#95dc85") # change background colour - NOTE Amrican spelling of colour (color)
- bob = turtle.Turtle() # creates our turtle called bob
- for i in range(40): # loop 4 times
- bob.color("blue")
- bob.pensize(10)
- bob.fd(200) # move bob forward 50 - (forward = fd)
- bob.lt(136) # turn 90 degress -(right = rt, left = lt)
- # line below is incorrect, sorry
- # wn.clickonclose() # closes the window
- #should be
- wn.exitonclick() # closes the window
Add Comment
Please, Sign In to add comment