Question
Create a program (with python), that reads a file of numbers and uses these numbers to draw shapes with Turtle Graphics. The first number should
Create a program (with python), that reads a file of numbers and uses these numbers to draw shapes with Turtle Graphics. The first number should be interpreted as an angle that the turtle should rotate to the right. Other numbers should be interpreted as the turtle going forward and drawing. Third numbers should be interpreted as an angle that the turtle should rotate to the right. The fourth number should be interpreted as the turtle going forward and drawing. And so on until the file is finished. Text that cannot be converted to numbers should be interpreted as a color, and the turtle's pen should be set to this color. Color names should be color names in plain English, without open spaces, newline characters or other punctuation. Negative numbers in the lines that say how far forward the turtle should move should be interpreted as the turtle moving forward without drawing (rather than as the turtle should move backwards) .one sampl picture are attached to the problem under. Use the turtle.pensize (3) command, or a number greater than 3, to see the colors in the drawings better.
90 100 180 200 red 90 50 black 90 200 red 90 50
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started