You are on page 1of 13

A

Project Report On

Snake Game Using Python


Submitted in the partial fulfilment of the requirement for the degree of

BACHELOR OF COMPUTER APPLICATIONS


(Session: 2023-24)

GOVERNMENT COLLEGE HANSI

Submitted by:
Under the Supervision of:
Name: Jitender & Dev Soni
Mrs. Uma Sharma
Roll No.: 213122220016
(Assistant Professor of Computer Science) : 213122220020
Class: B.C.A (5th Sem)
DEPARTMENT OF COMPUTER SCIENCE
GOVERNMENT COLLEGE, HANSI

Affiliated TO
GURU JAMBHESHWAR UNIVERSITY OF SCIENCE AND TECHNOLOGY HISAR
Project Report On

Snake Game Using Python

GURU JAMBHESHWAR UNIVERSITY OF SCIENCE &


TECHNOLOGY, HISAR
In the partial fulfilment of the requirement for the degree of
BACHELOR OF COMPUTER APPLICATIONS
(Session: 2023-24)

Under the Supervision of:


Mrs. Uma Sharma Submitted by:
(Assistant Professor of Computer Science)
Name: Jitender & Dev Soni
Roll No.: 213122220016
213122220020
Class:-B.C.A.(5thSem)

1
GOVERNMENT COLLEGE, HANSI

CERTIFICATE

This is to certified that Mr. Jitender & Dev Soni, Roll no: 213122220016 &
213122220020. A Bonafide student of Bachelor of Computer Applications program
being run by GOVERNMENT COLLEGE, HANSI of batch 2021-24 has complete
the project entitled “Snake Game Using Python” under my supervision and my
guidance. It is further certified that the work done in this project is a result of
candidate’s own efforts. I wish her all success in her life.

Department of Computer Science SUPERVISOR


Dr. Banta Singh Jangra H.O.D. Mrs. Uma Sharma

1
Declaration
I hereby certify that the work which is being presented in the Project Report entitled
“Snake Game Using Python” by “Jitender & Dev Soni” in partial fulfilment of
requirement for the award of degree of BCA submitted in the department of Computer
Science and Applications, GOVERNMENT COLLEGE, HANSI under “GURU
JAMBHESHWAR UNIVERSITY OF SCIENCE AND TECHNOLOGY”. Hisar is an
authentic record of my own work carried out during a period of 2021-24 under the
supervision of Mrs. Uma Sharma the matter presented in this project has not been
submitted in any other university/institute for the award of BCA degree.

Your Name

This is to certified that the above statement made by the candidate is correct to best of
our knowledge.

Supervision
Mrs. Uma Sharma

2
ACKNOWLEDGEMENT

The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless corporation made it
possible, whose constant guidance and encouragement crown all efforts with success.
Every possible effort is dedicated to Dr. Banta Singh Jangra and my internal
supervisor for giving me a new Mrs. Uma Sharma significance to our endowment
regarding this project. I am highly indebted for the gesture, invaluable suggestion and
boosting confidence to make this successful.
I am thankful to my entire respected faculty members who were a great source of
information and knowledge for me. For the guidance, inspiration and constructive
suggestion that helped me in the preparation of this project.
I dedicated my whole effort in this project to my parents and friends, who assisted me
with all kind of moral as well as monetary support throughout my project work. I also
extend my apologies for all errors or omissions. Which are solely my responsibility.

Your Name

3
INDEX

CONTENTS PAGE NO
1. Abstract ……………………………………….. 6
2. Introduction .............................................................. 7-11
2.1. Python .........................................
2.2 Tkinter ................................................................
2.3 Pygame ..................................................................
3. Description of the project .........................................
3.1. Snake Game ......................................................... 12-14
3.2 Description of game: ………………………………….
4. Software Requirements: ………………………………...
5. Hardware Requirements: ………………………………...
6. Conclusion: ……………………………………..

4
1.ABSTRACT

The purpose of the project entitled as “Snake Game in Python” is to


computerize the Front Office Management of Hospital to develop software
which is user friendly simple, fast, and cost – effective. It deals with the
collection of patient’s information, diagnosis details, etc. Traditionally, it
was done manually. The main function of the system is register and store
patient details and doctor details and retrieve these details as and when
required, and also to manipulate these details meaningfully System input
contains patient details, diagnosis details, while system output is to get these
details on to the screen. The Hospital Management System can be entered
using a user name and password. It is accessible either by an administrator
or receptionist. Only they can add data into the database. The data can be
retrieved easily. The data are well protected for personal use and makes the
data processing very fast.
2. Introduction

Python:

The game is developed using Python is an interpreted, object-


oriented, high-level programming language with dynamic semantics. Its high-
level built-in data structures, combined with dynamic typing and dynamic
binding. Python’s simple, easy to learn syntax emphasizes readability and
therefore reduces the cost of program maintenance. Python supports modules
and packages, which encourages program modularity and code reuse. The
Python interpreter and the extensive standard library are available in source or
binary form without charge for all major platforms and can be freely distributed

Tkinter:

Python offers multiple options for developing GUI (Graphical User


Interface). Out of all the GUI methods, Tkinter is most commonly used method.
It is a standard Python interface to the TK GUI toolkit shipped with Python.
Python with Tkinter outputs the fastest and easiest way to create the GUI
applications. Creating a GUI using Tkinter is an easy task. Tkinter includes a
number of Python modules. The two most important modules are the Tkinter
module itself, and a module called Tkconstants. The former automatically
imports the latter, so to use Tkinter, all you need to do is to import one module.

Pygame:

Game programming is very rewarding nowadays and it can also be


used in advertising and as a teaching tool too, Game development includes
mathematics, logic, physics, Al, and much more and it can be amazingly fun. In
python, game programming is done in pygame and it is one of the best modules
for doing so.

6
3. Description of the Project

Snake game:

Although the concept of snake-based games originated in


1976, there was a resurgence of interest only after a variant was preloaded on
Nokia mobiles in 1998. We have optimized the exact same variant using Python
programming language. When user hits “start” generated at predefined position
on the canvas and a position. We can control snake movements using “UP”,”
DOWN”.” RIGHT” and LEFT” keys of our keyboard. When head of snake
collides with the disappears, snake size increases by one block and a new food
is generated at some random position on canvas other than the areas covered by
stake parts. Piece of food is generated at a random place.

Description of Game:
The current snake game is a single player game.
The game interface is built in 2D format. The game is displayed in the pygame
window. Here, it consists of two points where one is fixed location is the food.
Whenever the snake gets the food the length of snake increases by one. The
speed of the snake can be altered from the code. The player controls a long, thin
creature, resembling a snake, which roams around on a bordered plane, picking
up food (or some other item), trying to avoid hitting its own tail or the edges of
the playing area. Each time the snake gets a piece of food, its tail grows longer
by one. Also, the player score increases by one and making the game
increasingly difficult. The user controls the direction of the snake’s head (up,
down, left, or right), and the snake’s body fellows a console window is created
as soon as the game starts. The game will terminate if the snake Head collides
with any of the window’s boundaries or with its own tail. Whenever the game is
finished, the score is displayed in the centre of the window. The GUI is
developed using Various sections and each section lead up to different
functionalities. The limitations with the Pygame and various image files are
used to create the interface. The interface is divided into existing system is that

7
the game has no dedicated storage allocated to store the user’s information and
performance statistics. The game has no information regarding the user so every
time the game is executed it is like the game is running for the first time.

4. Software Requirements

The software minimum recommended requirements and maximum


recommended requirements are listed below:
Software Minimum Maximum
Recommended Recommended
Requirements Requirements
System type Microsoft Win7 XP Microsoft Win10 64bit
32bit Operating System Operating System
Storage FAT File System NTFS File System

8
5. Hardware Requirements
The hardware minimum and maximum recommended requirements are listed
below:
Hardware Minimum Maximum
Recommended Recommended
Requirements Requirements
Internal Memory 2.00 GB 3.00 GB or Higher
(RAM)
Hard Disk Capacity 60.00GB 80.00GB or Higher
(CPU)
Processor Intel Pentium 1.60GHZ Intel(R) Core i3 2.40
GHZ or Higher
Monitor 17” Coloured 32bit 18” Coloured or Higher
64bit
Video Card 128MB AGP 256 MB AGP or Higher

• Disk Drives
Each client computer must have enough disk space available to store the client
portion of the software and any data files that needs to be stored locally. It is
best to provide a local disk drive for each client computer. However
Client/Server applications can use the “diskless workstations” for which the
only disk access is the disk storage located on a network file server. The hard
9
disk drive at database server should be at least of the capacity 4.1 GB. But it is
recommended to have one of capacity 8.2 GB.
• Mouse A mouse is a must for the client software running under Windows
OS or any other graphical environment.
• Keyboard Each client must have a 104 keys extended keyboard.

10
CONCLUSION

Our project is on “Snake Game Using Python” we have successfully


completed it. We take this opportunity to express our sense of humour and
contributed a lot to our knowledge that has proved to be a value addition for us.
Hence all the process works perfect and meeting to all user requirement.

My aim is to present the system of “Snake Game Using Python” is an


understandable manner.

11

You might also like