Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions