Question: Hello! Can you please modify this turtle python program to draw the numbers 4 and 5. Numbers 1 and 2 are already in the program.

Hello! Can you please modify this turtle python program to draw the numbers 4 and 5. Numbers 1 and 2 are already in the program. Thanks! ---------- import turtle # functions def drawOne(): # since we are drawing a 1, we are only going down 2 times numberDrawer.right (90) for i in range (2): numberDrawer.stamp() #leave an impression on the canvas numberDrawer.forward(100) def drawTwo(): # since we are drawing a 2, we are # going right 1 numberDrawer.stamp() numberDrawer.forward(100) #going down 1 numberDrawer.right (90) numberDrawer.stamp() #leave an impression on the canvas numberDrawer.forward(100) #going left 1 numberDrawer.right(90) numberDrawer.stamp() numberDrawer.forward(100) #going down 1 numberDrawer.right (-90) numberDrawer.stamp() #leave an impression on the canvas numberDrawer.forward(100) #going right 1 numberDrawer.right(270) numberDrawer.stamp() numberDrawer.forward(100) ################################### main program wn = turtle.Screen() wn.bgcolor("lightgreen") numberDrawer = turtle.Pen() numberDrawer.color("blue") # for more information on how to get input check out https://docs.python.org/3/library/turtle.html#input-methods NumberChoice = turtle.numinput("get Input","please enter the number you want to draw", 1, 1, 2, 4) if NumberChoice == 1: drawOne() # call the function which draws a 1 elif NumberChoice == 2: drawTwo() #no other choices will be allowed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!