Professional Documents
Culture Documents
On
Submitted
by Mayank
Saini
This is to certify that the work in the project report entitled “student
management system” by Mayank bearing A5050482006 is a Bonafide record of
project work carried out by him under my supervision and guidance in partial
fulfilment of the requirements for the award of the degree of Bachelor of
Computer Application” III semester in the Department of Computer Science and
Engineering, Amity School of Engineering and Technology, Amity University
Haryana, Gurgaon.
Signature of Supervisor
Date:30/7/2022
Name & Designation
Deepti Sehrawt
Assistant Professor
Student management system will help in managing report card and the records
of the student . It will also help in consuming time and efforts will be used . The
user interface will make much easier for students and the information of one
student will be obtained in just one click.
1. Declaration 2
2. Certificate 3
3. Acknowledgement 4
4. Abstract 5
5. Introduction 7
7. History 9
8. Features of Python 10
Certificate 8
Screenshots of code
Screenshot 1(4.1) 19
Screenshot 2(4.2) 20
Screenshot 3(4.3) 20
Screenshot 4(4.4) 21
Screenshot 5(4.5) 21
Screenshot 6(4.6) 22
Screenshot 7(4.2) 22
Screenshot 8(4.8) 23
Screenshot 9(4.9) 24
Screenshot 10(4.10) 24
Screenshot 11(4.11) 25
Screenshot of Code
Screenshot 1(5.1) 28
Screenshot 2(5.2) 29
Screenshot 3(5.3) 30
Screenshot 5(5.5) 32
Screenshot 6(5.6) 33
Introduction
What do the alphabet and the programming language Python have in common? Right, both start
with ABC. If we are talking about ABC in the Python context, it's clear that the programming
language ABC is meant. ABC is a general-purpose programming language and programming
environment, which was developed in the Netherlands, Amsterdam, at the CWI (Centrum
Wiskunde & Informatica). The greatest achievement of ABC was to influence the design of
Python.
Python was conceptualized in the late 1980s. Guido van Rossum worked that time in a project at
the CWI, called Amoeba, a distributed operating system. In an interview with Bill Venners1,
Guido van Rossum said: "In the early 1980s, I worked as an implementer on a team building a
language called ABC at Centrum voor Wiskunde en Informatica (CWI). I don't know how well
people know ABC's influence on Python. I try to mention ABC's influence because I'm indebted
to everything I learned during that project and to the people who worked on it."
Later on in the same Interview, Guido van Rossum continued: "I remembered all my experience
and some of my frustration with ABC. I decided to try to design a simple scripting language that
possessed some of ABC's better properties, but without its problems. So I started typing. I
created a simple virtual machine, a simple parser, and a simple runtime. I made my own version
of the various ABC parts that I liked. I created a basic syntax, used indentation for statement
grouping instead of curly braces or begin-end blocks, and developed a small number of powerful
data types: a hash table (or dictionary, as we call it), a list, strings, and numbers."
Source code:
import sys import
random
class Cons:
BOARD_WIDTH = 300
BOARD_HEIGHT = 300
DELAY = 100
DOT_SIZE = 10
MAX_RAND_POS = 27
class Board(Canvas):
background="black", highlightthickness=0)
This PDF document was edited with Icecream PDF Editor.
Upgrade to PRO to remove watermark.
self.iapple = None
self.apple = None
self.head = None
def initGame(self):
"""initializes game"""
self.inGame = True
self.dots = 3
self.score = 0
self.moveX =
Cons.DOT_SIZE
self.moveY = 0
self.loadImages()
self.createObjects()
self.locateApple()
This PDF document was edited with Icecream PDF Editor.
Upgrade to PRO to remove watermark.
self.bind_all("<Key>",
self.onKeyPressed)
self.after(Cons.DELAY,
self.onTimer)
def loadImages(self):
"""loads images from the disk"""
try:
self.idot =
Image.open("dot.png")
self.dot =
ImageTk.PhotoImage(self.idot)
self.ihead =
Image.open("head.png")
self.head =
ImageTk.PhotoImage(self.ihead)
self.iapple =
Image.open("apple.png")
self.apple =
ImageTk.PhotoImage(self.iapple)
except IOError as e:
print(e)
sys.exit(1)
def createObjects(self):
"""creates objects on Canvas"""
This PDF document was edited with Icecream PDF Editor.
Upgrade to PRO to remove watermark.
self.create_text(30, 10, text="Score:
{0}".format(self.score),
tag="score",
self.create_image(self.appleX, self.appleY,
image=self.apple,
anchor=NW,
tag="apple")
def checkAppleCollision(self):
apple =
self.find_withtag("apple")
head = self.find_withtag("head")
if apple[0] == ovr:
self.score += 1
x, y = self.coords(apple)
self.create_image(x, y,
image=self.dot,
This PDF document anchor=NW,
was edited with Icecream PDF Editor. tag="dot")
Upgrade to PRO to remove watermark.
def moveSnake(self):
z=0
c1 =
1]) self.coords(item
s[z]) c2 =
self.coords(item
s[z +
self.move(items[z],
c2[0] -
c1[0], c2[1] - c1[1])
z += 1
self.move(head, self.moveX,
self.moveY)
def checkCollisions(self):
if x1 < 0:
self.inGame = False
if x1 > Cons.BOARD_WIDTH -
Cons.DOT_SIZE:
self.inGame = False
if y1 < 0:
self.inGame = False
if y1 > Cons.BOARD_HEIGHT -
Cons.DOT_SIZE:
self.inGame = False
def locateApple(self):
"""places the apple object on Canvas"""
apple =
self.find_withtag("apple")
self.delete(apple[0])
r = random.randint(0,
Cons.MAX_RAND_POS)
self.appleX = r * Cons.DOT_SIZE r =
random.randint(0,
Cons.MAX_RAND_POS)
self.appleY = r * Cons.DOT_SIZE
This PDF document was edited with Icecream PDF Editor.
Upgrade to PRO to remove watermark.
self.create_image(self.appleX, self.appleY,
anchor=NW,
key = e.keysym
LEFT_CURSOR_KEY = "Left"
RIGHT_CURSOR_KEY = "Right"
RIGHT_CURSOR_KEY = "Up"
if key == RIGHT_CURSOR_KEY and
self.moveY <= 0:
self.moveX = 0
self.moveY = -Cons.DOT_SIZE
DOWN_CURSOR_KEY = "Down"
if key == DOWN_CURSOR_KEY and
self.moveY
This PDF document was edited with >= 0: PDF Editor.
Icecream
Upgrade to PRO to remove watermark.
self.moveX = 0
self.moveY = Cons.DOT_SIZE
self.drawScore()
self.checkCollisions()
if self.inGame: self.checkAppleCollision()
self.moveSnake()
self.after(Cons.DELAY,
self.onTimer)
else:
self.gameOver()
def drawScore(self):
"""draws score"""
score =
self.find_withtag("score")
self.itemconfigure(score, text="Score:
{0}".format(self.score))
def gameOver(self):
self.delete(ALL)
This PDF document was edited with Icecream PDF Editor.
Upgrade to PRO to remove watermark.
self.create_text(self.winfo_width() / 2,
self.winfo_height() / 2,
text="Game Over
with score {0}".format(self.score),
To conclude this project this project made by help of python as this and this we achieved a
smooth system for online games and other people and this runs flawless but the only thing is
per the data modification can happen anytime so only thisis limitation. The coding of Snake
was extremely difficult with many errors arising.
Many systems had to be written numerous ways before a final working solution was found. For
example, two different movement methods were used prior to final version; however, even the
final version is flawed as vertical movement causes the snake to change scale. There were also
issues with the food – snake collision detection. While the final version resulted in a snake that
could eat food, the movement glitch caused the food to cause further size issues.
Despite the fact that the game could not truly be played due to the fact no score could be given,
the game is still satisfying. With the exception of the size glitch when turning, the snake
responds to user input and moves around the screen as directed. Given longer to work on this,
the collision detection with the movement would be the first thing fixed. By fixing this, all
other sections of code that are currently not working would run.
The leaderboard would work as there would be correct scores input, and the snake would grow
as the food would cause it to only increase by one and not varying numbers based on direction.
In addition, fixing the movement would allow for the snake to die when colliding with itself. In
the current state, the snake moves as a matrix so it can not kill itself as it would be impossible
to move in any direction. This failure to establish a perfect movement system was the biggest
disappointment of the game as all other problems stemmed from it.
For these reasons, it is recommended that anyone who wishes to recreate this game starts
simply when writing the code. It is advisable that they first perfect the snakes movement
controls before messing with the food generation. By taking the code in small sections, it is
easier to get individual features to work. Building off this, use functions to contain each aspect
of the game. Using functions made it easier to determine where errors were occurring when
debugging the code. It also kept the code more organized.