Project Z
Project Z
Project Report
On
Submitted to
CHHATTISGARH SWAMI VIVEKANAND TECHNICAL UNIVERSITY
BHILAI
In partial fulfillment of requirement for the award of degree
Of
Bachelor of Engineering
In
Electronics and Telecommunication EngineeringEngineering
By
JAINENDRA SHRIVASTAVA
301602819021
SESSION 2021-22
DECLARATION
I Solemnly declare that the report of the project work entitled “Making a classic game Pong
using Python ” is based on my own work carried out during the course of my study under the
supervision of Prof. Mr. Manjeet Singh Sonwani Sir Department of Electronics and
Telecommunication Engg., NGEC Raipur.
I assert that the statement made and conclusions drawn are on outcomes of the project
that to the best of my knowledge and belief that the report does not contain any part of my work
which has been submitted for the award of any other degree/diploma certificate in this University
or any other University.
Jainendra Shrivastava
Roll No. : 301602819021
Enrollment No. : BH3051
CERTIFICATE
This is to certify that the report of the report of the project submitted is an outcome of the project
work titled “CREATING A NEW GAME:’ZOMBIE ATTACK’ SUING PYTHON AND THE
CLASSIC GAME PONG” carried out by Jainendra Shrivastava bearing Roll No.:301602819021
and Enrollment No.:BH3051 carried out under my guidance and supervision for the award of
degree in Bachelor of Engineering in Electronics & Telecommunication Engineering of
Chhattisgarh Swami Vivekanand Technical University, Bhilai (C.G.), India.
To the best of my knowledge the report
• Embodies the work of the candidate him/herself.
• Has duly been completed,
• Fulfills the requirement of the Ordinance relating to the B.E. degree of the
University and
• Is up to the desired standard for the purpose of which it is submitted.
This project work as mentioned above is hereby recommended and forwarded for examination
and evaluation to Chhattisgarh Swami Vivekanand Technical University, Bhilai (C. G.)
UNIT-1
INTRODUCTION
UNIT – 2
PROJECT: “Creating a
new game: ‘ZOMBIE
ATTACK’ using python &
the classic game Pong”.
–3
UNIT-3
UNIT
COURSE: “Python
for beginners”
COURSE: “Python
for beginners”
UNIT – 4
PROJECT: “Creating a
new game: ‘ZOMBIE
ATTACK’ using python
and the classic game
Pong”
]
UNIT – 5
Bibliography
UNIT – 6
Certificate Copy
INTRODUCTION
Nowadays, we are surrounded by many electronic gadgets and devices like smart phones,
washing machine, air conditioner, automatic driverless vehicles , industrial and humanoid robots
like Asimov, and a lot more stuffs which are made using the scientific and mathematical skills.
Software opens a wide range of applications to create virtual platform for doing many things like
playing games , doing animations, businesses, writing , communications, information storing and
sharing, entertainment, etc.
As software is a collection of programs and data files that are designed to perform
some operations. We have a lots of programming language to create any software for any purpose .
Some of the most popular are Python, JavaScript, Java, PHP, C#, C++, C, and so on.
Today, Python is considered as one of the most dynamic as well as robust programming
languages. It is easy to learn and has a code readability and a syntax which makes it easy to use as
it needs lesser lines of code than other programming languages like C++ and Java to complete a
task.
Python is an interpreted programming language which is object oriented used for general purpose
programming. Python can be used in a variety of operating systems such as mac, windows, Linux,
UNIX, etc.
My summer training course was to learn the python language at beginner level, and to create a
project : “Creating a new game: ‘ZOMBIE ATTACK’ using python and the classic game Pong”
based on my learning from this course.
Throughout this thesis ‘PROJECT: “Creating a new game: ‘ZOMBIE ATTACK’ using python
and the classic game Pong” , Firstly, I will give an overview of the course lessons of my online
training course on “ Python for beginners ”, and then I will bring my project of making the classic
game Pong and the new game Zombie Attack by my own at the end using python programming.
AIM
The aim of my project is to make the classic game PONG and a new game ‘ZOMBIE ATTACK’
using the python programming language and to discover the basic of creating a game in python or
any other programming language.
DESCRIPTION
‘ PONG ‘ is one of the first computer games that ever created, this simple tennis like
game features two paddles and a ball, the goal is to defeat your opponent by being the first one to
gain 10 point, a player gets a point once the opponent misses a ball hit by the paddle . The game
can be played with two human players or one player against a computer controlled paddle. The
game was originally developed by Allan Alcorn and released in 1972 by Atari corporations. Soon,
Pong became a huge success, and became the first commercially successful game, on 1975, Atari
release a home edition of Pong which sold 150,000 units. Today, the Pong Game is considered to
be the game which started the video games industry, as it proved that the video games market can
produce significant revenues.
Making the Pong game using Python requires a few pages of code. And as Python
comprises of many libraries for creating a Graphical User Interface (GUI) page by accessing many
functions from it, creating this game will be easier, since we do not need to know and work on the
hardware setups. The Turtle library function in Python has been used in the creation of these game.
Further a few methods that are used in the game Pong is utilized in the creation of a
new game ‘ZOMBIE ATTACK’. In this game whenever the dice is rolled, the red block
representing zombie spreads a step forward and the green block representing player moves the
amount of steps that has appeared on the dice. There are few buildings(hurdles) that comes along
the path of the player, over which the player cannot jump directly instead have to enter the building
and needs the number on the dice rolled to be greater than the number of floors present in the
building. The player wins the game if the player reaches the end of the path before the attack of
the zombies to convert the player itself into a zombie,
OVERVIEW
1.Easy to code:
Python is a high-level programming language. Python is very easy to learn the language as
compared to other languages like C, C#, JavaScript, Java, etc. It is very easy to code in python
language and anybody can learn python basics in a few hours or days. It is also a developer-
friendly language.
3 Object-Oriented Language:
One of the key features of python is Object-Oriented programming. Python supports object-
oriented language and concepts of classes, objects encapsulation, etc.
5. High-Level Language:
Python is a high-level language. When we write programs in python, we do not need to
remember the system architecture, nor do we need to manage the memory.
6. Extensible feature:
Python is a Extensible language. We can write us some Python code into C or C++ language and
also we can compile that code in C/C++ language.
9. Interpreted Language:
Python is an Interpreted Language because Python code is executed line by line at a time. like
other languages C, C++, Java, etc. there is no need to compile python code this makes it easier to
debug our code. The source code of python is converted into an immediate form
called bytecode.
Hardware requirement:
• An operating system with Linux, Window 7 or higher.
• Hard disk space of 250 GB or more.
• RAM 8 GB or more.
Software requirement:
• Having a Browser like Google Chrome or Internet Explorer with JavaScript enabled in it.
• Also it is recommended to have a text editor such as Notepad or Notepad++.
• Install python 3 and related packages.
• Also it will be good to have an IDE like Jupyter or pycharm.
PYTHON INSTALLATION
PYTHON VARIABLES:
▪ Variables are entities of a program that hold a value.
Like, x = 100
▪ Data type is the type of value you assign to the variable .
▪ Integers are numbers without decimal points.
▪ Float are numbers with decimal point.
▪ Strings are characters set.
Program:
x = 100
type(x)
x = 654*6734
type(x)
print(x)
x = 3.14
type(x)
print(x)
x = “Pong”
type(x)
print(x)
Rules for naming variables :
• Variable name should begin with an alphabet or underscore.
• The first character can be followed by alphabets, number or underscore.
• Variable name are case sensitive. a100 is different from A100.
• Reserved words cannot be used a variable names
like break, day try, cannot be used as the variable names .
Python Numbers
• Variables of numeric types are created when you assign a value to them.
• There are three distinct numeric types: Integers, floating point numbers and complex
umbers.
Lists
• If Else statement
Syntax: if condition:
Executes this block if the condition is true.
else:
Executes this block if the condition is false..
• Nested if statement
Syntax: if condition 1:
Executes if condition 1 is true.
if condition 2:
Execute if condition 2 is true
Condition 2 ends here.
Condition 1 ends here.
• If – Elif – Else statements
Syntax: if condition:
Executes the if condition statements.
elif condition:
Executes the elif condition statements.
else:
Else statements.
Python loops
• A loop is an instruction that repeats multiple times as long as some condition is met.
Throughout this project work, the high level language Python has been learnt and utilized in
developing a simple game on computer. Thus, like this many other games and other applications
or software can be developed using this language that may help to solve many real life problems.
For example, we may apply software to create mechatronics devices which combines the
mechanical movements and electronic circuits to create a electronically controlled mechanical
device.
BIBLIOGRAPHY