Lesson 16: Squares with Turtle

posted Mar 5, 2020, 8:02 AM by Attila Lengyel
import turtle as t
bob = t.Turtle()

bob.speed(30)
x = [-160,-130,-100, -70, -40, -10]
y = [160, 130, 100, 70, 40, 10]

for a in x:
for b in y:
bob.penup()
bob.setposition(a,b)
bob.pendown()

for i in range(4):
bob.fd(30)
bob.right(90)
Comments