Skip to content

Instantly share code, notes, and snippets.

@robertlugg
Created February 15, 2020 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertlugg/ed07df6c0813947cc087c2d691d6c312 to your computer and use it in GitHub Desktop.
Save robertlugg/ed07df6c0813947cc087c2d691d6c312 to your computer and use it in GitHub Desktop.
Using Python turtle graphics to draw a shape.
"""
Turtle graphics demo.
Reference: https://www.geeksforgeeks.org/turtle-programming-python/
"""
import turtle
wn = turtle.Screen()
wn.bgcolor("light green")
turtle.goto(100, 141)
turtle.goto(100, 30)
turtle.goto(0, 0)
turtle.penup()
turtle.goto(100, 141)
turtle.pendown()
turtle.goto(0, 200)
turtle.goto(-100, 141)
turtle.exitonclick()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment