Python Turtle: Four Flowers

Publicado el: 16 enero 2022
en el canal de: Basic Python Turtle Art
208
0

An image of four flowers with stem generated by Python Turtle. The code includes a major loop that draws four flowers and a minor loop that generates eight petals for a flower.

Please feel free to copy and paste the code below. Enjoy!
import turtle
scrin = turtle.Screen()
scrin.bgcolor("white")
t = turtle.Turtle()
t.hideturtle()
t.pensize(3)
t.speed(5)
#Draw four flowers
for colors in ["red", "green", "orange", "blue"]:
t.penup()
t.goto(0,0)
t.pendown()
t.color(colors)
t.forward(130)
t.left(90)
#Draw 8 petals per flower
for j in range (8):
t.forward(60)
t.right(120)
t.forward(90)
t.right(120)
t.forward(90)
t.right(120)
t.forward(30)
t.left(45)
scrin.exitonclick()


En esta página del sitio puede ver el video en línea Python Turtle: Four Flowers de Duración hora minuto segunda en buena calidad , que subió el usuario Basic Python Turtle Art 16 enero 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 208 veces y le gustó 0 a los espectadores. Disfruta viendo!