How to Draw a quadrilateral in Python?
PROGRAM
#how to draw a (quadrilateral)square in python
import turtle
bob=turtle.Turtle()
#used for thick line
bob.pensize(2)
#square
bob.forward(100)
bob.left(90)
bob.forward(100)
bob.left(90)
bob.forward(100)
bob.left(90)
bob.forward(100)
#moving the turtle...
bob.penup()
bob.goto(0,-200)
bob.pendown()
turtle.done()
OUTPUT:
No comments: