Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 5.3 (navigate3.py) Modify navigate.py so that, rather than take instructions from the command line, it reads from a file (specified by user input) to

image text in transcribed
image text in transcribed
Exercise 5.3 (navigate3.py) Modify navigate.py so that, rather than take instructions from the command line, it reads from a file (specified by user input) to determine what the turtle will do. Additionally, you will be adding the "spli" command. This command will use instantiation of new turtles in order to draw multiple lines at once. Every new command will apply to every turtle that currently exists. The file will have on instruction per line. The possible instructions are: forward X Move all turtles forward X. left X Turn all turtles X degrees to the left. right X Turn all turtles X degrees to the right. split X Crea Sample input file: te a new copy of every turtle Each new tu rtle will be turned X degrees to the right. forvard 50 2 left 20 split 40 forard 50 s left 20 6 split 40 7 forward 50 s left 20 9 split 40 o forward 50 left 20 2 split 40 3 forward 50 4 left 20 Sample output: 8

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

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions