lunes, 6 de octubre de 2025

Programming triangles with the turtle animations

Programming triangles with the turtle animations



import turtle

t = turtle.Turtle()

t.speed(5) # 1:slowest, 3:slow, 5:normal, 10:fast, 0:fastest

t.forward(100)

# Turns the turtle left 120 degrees.

t.left(120)

t.forward(100)

# Turns the turtle left 120 degrees.

t.left(120)

t.forward(100)

t.forward(100)

t.left(120)

t.forward(200)

t.left(120)

t.forward(100)

t.right(120)

t.forward(100)

No hay comentarios:

Publicar un comentario