turtle_prof_002.py

Created by niz-moussatat

Created on June 28, 2022

608 Bytes


# Type your text here
from turtle import *
def triangle() :
    for i in range(3) :
        forward(40)
        right(120)
def petale(i) :
    left(90-i)
    forward(20)
    left(2*i)
    forward(20)
    left(180-2*i)
    forward(20)
    left(2*i)
    forward(20)
    left(90-i) 
goto(0,-80)
setheading(90)
pendown()
color(0,250,0)
forward(120)
left(60)
triangle()
right(105)
triangle()
left(180)
triangle()
left(45)
forward(40)
for i in range(20) :
  color(50,255-10*i,50)
  petale(i)
forward(20)
left(180)
for i in range(20) :
  color(50,255-10*i,50)
  petale(i)
backward(60)
penup()