Computer Science Project
Computer Science Project
EXAMINATION
AISSCE
SESSION 2020-21
BIRLA SCHOOL, PILANI
Computer Project
On
AUTOMOBILE SERVICE STATION
I of Class XII A
with immense pleasure for presenting
my Project for the session 2020-21.
TABLE OF CONTENTS
INTRODUCTION TO PYTHON.
INTRODUCTION TO THE
PROJECT.
ACKNOWLEDGEMENT.
SYSTEM REQUIREMENTS.
BACKEND DETAILS.
FRONTEND DETAILS.
MOTIVE.
SCREEN SHOTS OF EXECUTION.
BIBLIOGRAPHY.
LIMITATIONS.
CERTIFICATE.
INTRODUCTION TO PYTHON
History of Python:
Python is a widely used general-purpose,
high-level programming language. It was
initially designed by Guido van Rossum in
1991 and developed by Python Software
Foundation. It was mainly developed for
emphasis on code readability, and its syntax
allows programmers to express concepts in
fewer lines of code.
INTRODUCTION TO THE PROJECT
SYSTEM REQUIREMENTS
HARDWARE REQUIREMENT:
Windows 7 or higher
My-SQL server 5.5 or higher (as
backend)
Python idle 3.6 or higher or spyder (as
frontend).
Microsoft Word 2010 or higher for
documentation.
BACKEND DETAILS
class int(2)
section char(1)
Code:
CREATE TABLE STUDENT (
adm_no INT(6) PRIMARY KEY,
Name VARCHAR(40),
class int(2),
section char(1));
Table Name: RESULT
Attributes:
Adm_no int(6)
exam_name varchar(30)
sub1 int(3)
sub2 int(3)
sub3 int(3)
sub4 int(3)
sub5 int(3)
total int(3)
percentage int(5)
attendance int(5)
grade char(1)
remarks varchar(50)
Code:
CREATE TABLE RESULT (
Adm_no int(6) PRIMARY KEY,
exam_name varchar(30),
sub1 int(3),
sub2 int(3),
sub3 int(3),
sub4 int(3),
sub5 int(3),
total int(3),
percentage int(5),
attendance int(5),
grade char(1),
remarks varchar(50));
FRONTEND DETAILS
PROGRAM CODE
import sys
import mysql.connector
mycon=mysql.connector.connect(host='localhost',user='root', password='root',database='exam')
mycur=mycon.cursor()
def Student_Profile():
try:
mycur.execute(sql,value)
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')
def Edit_Profile():
value=(nm,ph)
try:
mycur.execute(sql,value)
mycon.commit()
except:
def Remove_Profile():
value=(ph,)
try:
mycur.execute(sql,value)
mycon.commit()
except:
mycon.rollback()
sql="Insert into
result(adm_no,exam_name,sub1,sub2,sub3,sub4,sub5,total,percentage,attendance,grade,remarks)values(%s,
%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
total=sub1+sub2+sub3+sub4+sub5
per=total//5
att=present/wrkday*100
att=int(att)
if(per>=90):
g='A'
rem='EXCELLENT PERFORMANCE!!'
g='B'
g='C'
rem='SATISFACTORY PERFORMANCE!!'
g='D'
rem='AVERAGE PERFORMANCE!!'
else:
g='E'
value=(ad,nm,sub1,sub2,sub3,sub4,sub5,total,per,att,g,rem)
try:
mycur.execute(sql,value)
mycon.commit()
except:
print('UNABLE TO INSERT!!!!!')
def Report_Card():
value=(ad,)
mycur.execute(sql1,value)
rec1=mycur.fetchone()
if(rec1!=None):
adm=rec1[0]
name=rec1[1]
cls=rec1[2]
sec=rec1[3]
value=(ad,)
mycur.execute(sql2,value)
rec2=mycur.fetchone()
if(rec2!=None):
adm=rec2[0]
exname=rec2[1]
sub1=rec2[2]
sub2=rec2[3]
sub3=rec2[4]
sub4=rec2[5]
sub5=rec2[6]
total=rec2[7]
per=rec2[8]
att=rec2[9]
g=rec2[10]
rem=rec2[11]
else:
print('\nCLASS-',cls,'SECTION-',sec,'\n')
print('\n------------------------------\n')
print('\nRESULT OF',exname,'\n')
print('\n------------------------------\n')
if(sec=='A'):
elif(sec=='B'):
print('\n ENGLISH : ',sub1)
elif(sec=='C'):
elif(sec=='D'):
def Remove_Record():
value=(ph,)
try:
mycur.execute(sql,value)
mycon.commit()
except:
mycon.rollback()
def Graph():
value=(ad,)
mycur.execute(sql1,value)
T=mycur.fetchone()
mycur.execute(sql2,value)
s=mycur.fetchone()
L=[T[2],T[3],T[4],T[5],T[6]]
sec=s[0]
if(sec=='A'):
sub1,sub2,sub3,sub4,sub5='English','History','Pol.Sc','Economics','Geography'
elif(sec=='B'):
sub1,sub2,sub3,sub4,sub5='English','Accountancy','B.Studies','Economics','Info.Practices'
elif(sec=='C'):
sub1,sub2,sub3,sub4,sub5='English','Physics','Computer Sc.','Chemistry','Mathematics'
elif(sec=='D'):
sub1,sub2,sub3,sub4,sub5='English','Physics','Biology','Chemistry','Mathematics'
sub=[sub1,sub2,sub3,sub4,sub5]
clr=('red','green','blue','orange','brown')
plt.bar(sub,L,color=clr)
plt.xlabel('Subjects')
plt.ylabel('Marks')
plt.title('Marks Analysis')
plt.show()
def Close():
sys.exit()
while(True):
if(choice==1):
Student_Profile()
elif(choice==2):
Edit_Profile()
elif(choice==3):
Remove_Profile()
elif(choice==4):
Record_Entry()
elif(choice==5):
Report_Card()
elif(choice==6):
Remove_Record()
elif(choice==7):
Graph()
elif(choice==8):
Close()
MOTIVE
Globalized usage.
BIBLIOGRAPHY
BOOKS:
WEBSITES:
www.geeksforgeeks.org
https://docs.python.org/3/
https://www.w3schools.com/python/
LIMITATIONS
The Project has no provision to
update marks after the report card
is generated.