Question
In this section of the lab we will be writing expanding on the program from lab 5 that creates a turtle and allows you to
In this section of the lab we will be writing expanding on the program from lab 5 that creates a turtle and allows you to control it with the keyboard as it moves about the screen.
You will be using the Python IDLE (a Python editor and programming environment that comes with python).
Name your file lab6_XX_turtle.py where you replace the XX with your initials. . . . . Your (turtle) program must include: A comment on the top line of your program containing your name.
A comment on the second line containing your section number.
A comment on the third line containing the date. A comment on the fourth line containing your email address. A comment with the lab number and purpose of this lab.
Don't forget to include import turtle on a line after the comments so you can use the various Turtle-related objects and methods. Modify your program from lab 5 to cause the turtle to return to the center of the screen if it moves more than 300 units from the center of the screen.
Add a second turtle (named after your favorite animal that is a different color and shape from the original turtle that moves randomly about the screen. It should begin facing a random direction and move at the speed of 4. Every 50 moves the turtle should turn a random direction and continue moving.
If this turtle moves more than 300 units away from the center, it should teleport back to the center (0,0) and continue moving. This turtle also should not leave a line behind it.
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