Question: Hello I need help modifying my code so that it allows different numbers of petals Please see image for further information Nothing fancy I am
Hello I need help modifying my code so that it allows different numbers of petals Unttled Notepad File Edit Format View Help #3.3.1. Modify the flower function so tha #additional parameter: flower(tortoise, fcolor, length, petals) Note that the original function has the turtle travel ta total of 8 135 1888 degrees awhen you generalize the number of petals, make sure that the total number of degrees is still a multiple of 360 import turtle import math t it allows different numberswof petals. The revised function will need to take an def blossum(tortoise, fcolor, length, petals): tortoise.pencolor('red') tortoise.fillcolor(fcolor) tortoise.begin_fill0 radius368 tortoise.circle(radius, steps) tortoise.forward(length) for meh in range(8) #tortoise, forward(length) tortoise.left (135) tortoise.end_fill) def stem(tortoise, length): tortoise.pencolor( ereen') tortoise.pensize(length /20) tortoise.up) tortoise.forward(length 2) tortoise.down() tortoise.right (90) tortoise.forward(length) def flower(tortoise, fcolor, length, petals): blossum(tortoise, fcolor, length, petals) stem(tortoise, length) rainbow turtle.Turtle) rainbow.hideturtle) flower(rainbow, 'yellow, 2ee, 6) O Type here to search
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
