Created
February 15, 2020 19:03
-
-
Save robertlugg/ed07df6c0813947cc087c2d691d6c312 to your computer and use it in GitHub Desktop.
Using Python turtle graphics to draw a shape.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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