CODE CREATIVE
RACING TURTLES
Slow and steady wins the race!
Ready… Set… Go!
We are going to use Python’s Turtle module to create a racing simulation. We will create 8 turtles that will start at the starting line and race to the finish line. The turtle who crosses first wins!

The first step to beginning the “Racing Turtles” lab would be to complete the lab found on Interactive Python. Complete the instructions found there and then come back and continue through this guide.

Now that you’ve completed the lab, you should have two turtles that race across the screen. Let's add to the application to make it more interesting. Remember, you are expected to make use of the Turtle module's documentation page!

Project
  • Create a starting and finish line.
  • Create 8 turtles and space them evenly at the starting line.
  • Use the write() and clear() methods to start the race with the text “Ready… Set… Go!”.
  • Use the turtle method xcor() to stop the race when the first turtle crosses the finish line.
  • Print out the color of the turtle that won.


Extra Credit
  • Stop the race after the third turtle crosses the finish line.
  • Print out the colors of the 1st, 2nd and 3rd place finishers.
  • Add a beginning/ending screen.
  • Add a betting system.


Add-Ons
Take a look at the videos below to get a blueprint on how to add additional elements to your project.

Introduction











Countdown











Declaring a Winner











Examples
Take a look below to see examples of the project in an outstanding range.

Nicholas Eng











Audrey Yang











Kyle Yen











Jack Moffat











Bryan Sy











Elizabeth Wang