Turtle Flower Python Here is the starter code: import turtle menu = "Press 1 for Flower \nPress 2 for original art \nPress 3 for colorful art" UserChoice = input(menu) #function to draw squares def...

Turtle Flower Python Here is the starter code: import turtle menu = "Press 1 for Flower \nPress 2 for original art \nPress 3 for colorful art" UserChoice = 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(petalNumber): window = turtle.Screen() window.bgcolor("yellow") pen = turtle.Turtle() pen.shape("triangle") pen.color("red") for number in range(0,petalNumber): draw_square(pen) pen.right(360/petalNumber) 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.exitonclick() #function for original art def originalArt(): print("This function will draw the original art") #function for colourful art def colour full Art(): print("This function will draw the colorful art") #if statement check the user choice if(UserChoice == "1"): numberOfPetals= int(input("How many petals?")) #the next line calls the draw_flower function draw_flower(numberOfPetals) elif(UserChoice == "2"): originalArt() #this line calls the originalArt function elif(UserChoice == "3"): colorfulArt()

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here