Turtle Flower Python Here is the starter code: import turtle menu = "Press 1 for Flower \n Press 2 for original art \n Press 3 for colourful art" User Choice = input(menu) #function to draw squares...


Turtle Flower Python Here is the starter code: import turtle menu = "Press 1 for Flower \n Press 2 for original art \n Press 3 for colourful art" User Choice = input(menu)


#function to draw squares

def draw _square(square):

for i in range(0,2):

square .forward(100)

square .right(70)

square .forward(100)

square .right(110)


#function to draw flower


def draw _flower(petal Number):

window = turtle .Screen()

window. Bg colour("yellow")



pen = turtle. Turtle()

pen. shape("triangle")

pen .colour("red")



for number in range(0,petalNumber):

draw _square(pen)

pen .right(360/petal Number)



for i in range(0,4):

pen. circle(20)

pen .right(90)



pen. right(90)

pen. forward(300)

pen. right(90)

draw _square(pen)

pen .left(180)

draw _square(pen)

pen .left(270)

pen .forward(200)



window .exit on click()


#function for original art

def original Art():


print("This function will draw the original art")

#function for colourful art

def colourful Art():

print("This function will draw the colourful art")

#if statement check the user choice

if(User Choice == "1"):

number Of Petals= int(input("How many petals?"))

#the next line calls the draw_ flower function

draw_ flower (number Of Petals)

life(User Choice == "2"):

original Art() #this line calls the original Art function

life(User Choice == "3"):

colourful Art()



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here