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()
Nesta página do site você pode assistir ao vídeo on-line Python Turtle: Four Flowers duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Basic Python Turtle Art 16 Janeiro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 208 vezes e gostou 0 espectadores. Boa visualização!