Question: write a function drawPlot(t,numList,c) which takes a turtle t and a color c and a list of integers [n1,n2,n3,....., nk] and draws a line of

write a function drawPlot(t,numList,c) which takes a turtle t and a color c and a list of integers [n1,n2,n3,....., nk] and draws a line of color c through the points (10,n1) (20,n2) (30,n3) (40,n4) .... and then draws a black line from (-200,0) to (0,200) and from (0,-200) to (0,200). Use the t.penup() and t.pendown() methods as well as the t.goto(u,v) method inside a loop. You will need to have variables to remember the last (x,y) in the plot so you can draw a line to the current (x,y)... Use this to plot this list of numbers [6, 9, 9, 9, 10, 10, 11, 11, 12]

Write it in python

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!