Share your repls and programming experiences

← Back to all posts
1.1.3 Fun With Flowers
OliverArey

painter = trtl.Turtle()
painter.speed(0)

stem

painter.color("Green")
painter.pensize(20)
painter.goto(0, -150)
painter.setheading(90)
painter.forward(100)

leaf

painter.setheading(270)
painter.circle(20, 120, 20)
painter.setheading(90)
painter.goto(0, -60)

rest of stem

painter.forward(30)
painter.setheading(-1.5)

change pen

painter.penup()
painter.shape("circle")
painter.pensize(10)

draw flower

painter.goto(20,180)
petals = 0
while (petals < 18):
painter.right(20)
painter.forward(30)
painter.color("Orange")
rem = petals % 3
if (rem == 0):
painter.color("Black")
painter.stamp()
petals = petals + 1

ring 2 of flower

painter.goto(20,151)
painter.color("Red")
petals = 0
while (petals < 12):
painter.right(30)
painter.forward(30)
painter.color("Black")
rem = petals % 2
if (rem == 0):
painter.color("Orange")
painter.stamp()
petals = petals + 1
painter.penup()
painter.goto(1.5, 91)
painter.pendown()
print("Happy Holloween")

wn = trtl.Screen()
wn.mainloop()

And this is the code!!!

Voters
whothis1
DerekStevens
OliverArey