0% found this document useful (0 votes)
858 views7 pages

Turtle

The document describes a project to create a turtle race game using Python. Loops will be used to draw the racetrack and move the turtles randomly. Players will each pick a turtle, and the one that reaches the finish line furthest wins. The game aims to teach concepts like for loops, random numbers, and turtle graphics in Python. It will use the turtle and random libraries. Individual roles include adding user accounts, testing, researching libraries, and creating presentations and reports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
858 views7 pages

Turtle

The document describes a project to create a turtle race game using Python. Loops will be used to draw the racetrack and move the turtles randomly. Players will each pick a turtle, and the one that reaches the finish line furthest wins. The game aims to teach concepts like for loops, random numbers, and turtle graphics in Python. It will use the turtle and random libraries. Individual roles include adding user accounts, testing, researching libraries, and creating presentations and reports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 7

TURTLE RACE

---------------------------------------------------------------------------------------
Abstract:

The final objective is to make a fully featured and functional turtle game. So we
plan to start with small simple steps.

We have decided to make the project using loops to draw a racetrack and create a
racing turtle game.

This project introduces for loops through a fun turtle race game. Loops are used to
draw the racetrack and to make the turtles move a random number of steps each
turn. If you have a group of people to play the game, each person picks a turtle and
the one that gets the furthest is the winner.

By making turtle race game, we will learn how to:

 Write for loops in Python

 Use random numbers in Python

 Draw lines in different colours with Python Turtle


Introduction:

Our aim is to design a TURTLE RACE game using python programming. We plan
to achieve this by using the turtle, randit libraries.

We have been inspired by seeing various models of Turtle Race in various sites like
GitHub, codeclub, geekforgeeks etc for its features and simplicity.

At first, we plan to make a simple prototype. and then we like to expand it and add
more features into it. Our final aim is to make a fully featured Turtle Race game
using library.

Modules:

 Login

 Player Credentials

 Game play

 Winner declaration
DFD’s:
Libraries:
Turtle:
To make use of the turtle methods and functionalities, we need to import
turtle.”turtle” comes packed with the standard Python package and need not be
installed externally. The roadmap for executing a turtle program follows 4 steps:

1. Import the turtle module


2. Create a turtle to control.
3. Draw around using the turtle methods.
4. Run turtle.done().
So as stated above, before we can use turtle, we need to import it. We import it as:

-------------------------

from turtle import *

#or

import turtle

-------------------------

“Turtle” is a Python feature like a drawing board, which lets us command a turtle
to draw all over it! We can use functions like turtle.forward(…) and turtle.right(…)
which can move the turtle around. Commonly used turtle methods are:
Method Parameter Description
Turtle() None Creates and returns a new
turtle object
forward() amount Moves the turtle forward
by the specified amount
backward() amount Moves the turtle
backward by the
specified amount
right() angle Turns the turtle
clockwise
left() angle Turns the turtle counter
clockwise
penup() None Picks up the turtles pen
pendown() None Puts down the turtles pen
up() None Picks up the turtles pen
down() None Puts down the turtles pen
color() Color name Changes the color of the
turtles pen
fillcolor() Color name Changes the color of the
turtle will use to fill a
polygon
heading() None Returns the current
Heading
position() None Returns the current
position
goto() X,Y Move the turtle to
position X,Y
begin_fill() None Remember the starting
point for a filled polygon
end_fill() None Close the polygon and
fill with the current fill
color
dot() None Leave the dot at the
current position
stamp() None Leaves an impression of
a turtle shape at the
current location
shape() Shape-name Should be ‘arrow’ ,
‘classic’ , ‘Turtle’ or
‘circle’

Role of individual:

Sumanth-11802395; Roll no-05; Adding users and file handling, ppt

Roshan-11806518; Roll no-10; Testing the prototype (Coding), final report


Harsha-11801554; Roll no-02; Working on Libraries and their functions, collection
of data.

References:

https://www.geeksforgeeks.org/turtle-programming-python/

https://projects.raspberrypi.org/en/projects/turtle-race

https://codeclubprojects.org/en-GB/python/turtle-race/

You might also like