About what I Work in class

i made something like this

and here is the code

import turtle 
a=turtle. Turtle()
a.getscreen().bgcolor("black")
a.penup()
a.goto(-200, 100)
a.pendown()
a.color("pink", "red",)
a.speed(25)
def square(turtle, size):
    for i in range (4):
        turtle.forward(size)
        turtle.left(90)

    if size>2:
        square(turtle, size*.9)

 


for i in range (16):
    square(a, 250)
    a.right(45)


turtle.done()

i changed this one

to the other one

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top