0% found this document useful (0 votes)
26 views2 pages

"Blue" 'Green' 'Turtle' 100: Import

The document shows Python code to draw shapes using the turtle module, including a green turtle moving forward 100 units, drawing 4 squares by repeating forward and left turns, and drawing a spiral of squares by incrementally turning left more each time.

Uploaded by

mijial canedo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views2 pages

"Blue" 'Green' 'Turtle' 100: Import

The document shows Python code to draw shapes using the turtle module, including a green turtle moving forward 100 units, drawing 4 squares by repeating forward and left turns, and drawing a spiral of squares by incrementally turning left more each time.

Uploaded by

mijial canedo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

import turtle

window = turtle.Screen()

window.bgcolor("blue")

turtle.color('green')

turtle.shape('turtle')

turtle.forward(100)

window.exitonclick()

turtle.done()
import turtle

for x in range(0, 4):

turtle.forward(50)

turtle.left(90)

turtle.done()

#Más cuadrados

turtle.color('red', 'blue')

turtle.begin_fill()

grados = 0

turtle.speed(15)

for x in range(1, 40):

for x in range(0, 4):

turtle.forward(50)

            turtle.left(90)
turtle.left(grados + 10)

turtle.end_fill()

You might also like