Cs Project
Cs Project
ANAND VIHAR
COMPUTER SCIENCE
PROJECT FILE
(2024-25)
Student's marks
management
NAME:Gauri dutta
Mongia
CLASS : XII ROLL NO.
:
CERTIFICATE
This is to certify that I, Pragya
mongia a student of class XII has
successfully completed the
PROJECT FILE under the guidance
of Mr tanveer and has followed all
the instructions given by CBSE.
________
________ Internal Examiner
External
ACKNOWLEDGEM
ENT
I would like to express my special
thanks of gratitude to Mr tanveer for
his
constant encouragement and
guidance provided throughout this
project. It helped me learn about a
lot of new
things. I am really thankful to her.
1.
Introduction 5
2. Objective and scope 6
3. System implementation 7
SYSTEM
IMPLEMENTATION
HARDWARE USED:
Device 1 : Lenovo G500 20236, Intel®
Pentium®,CPU 2020M @ 2.40GHz, 4GB RAM,
64 bit OS,x64 based processor Device 2 :
Redmibook 15 Pro, 11th Gen Intel® CORE™
i5 11300H, 3.10GHz, 8GB RAM, 64 bit OS, x64
based processor
SOFTWARE USED:
# Operating system : Windows 10 Home
Single Language # Python IDLE 3.8(64 bit)
as Front-End development environment
#MySQL as Back-End Server with
Database for testing #mysql.connector
to connect python module with
database # MS-Word for documentation
THEORETICAL
BACKGROUND
WHAT IS PYTHON?
Python is an open source, Object-Oriented high
level
programming language developed by Guido-Van
Rossum in 1991 at the National Research
Institute for Mathematics, Netherlands.
Python is a general purpose programming
language that can be used effectively to build
any kind of program.
FEATURES OF PYTHON:
# It is an interactive, Interpreted language
# It is a loosely typed Object-Oriented language
# It is a free open-source and portable language
# It takes less time to develop program
# It supports GUI
# It can be easily compatible with other
languages like C, C++
# It is used for both scientific and non-scientific
programming
ADVANTAGES OF PYTHON:
# Dynamic
# Platform Independent
# Readability
# Object-Oriented
# High Productivity
# Easy to Learn
# GUI based
# Syntax Highlighting
INSTALLING PYTHON :
WHAT IS DATABASE?
them together
A database is defined as an organised collection of
data about entities. DBMS are designed applications
that connect user and program and store data in
organised manner. Using RDBMS that connect user
and program to store data in organised manner.
Using RDMBS application like MySQL, Oracle, Sybase,
etc.
MySQL:
MySQL is an open source and freely available RDBMS
that uses the SQL. It is developed, distributed, and
supported by Oracle corporation.
FEATURES OF MySQL:
#Can retrieve data from database through query
processing.
# It can insert and update records in database
WHAT IS FILE HANDLING?
A file is document stored on permanent storage
device which can be read and rewritten
according to requirement. Data files can be
stored in 3 formats:
#TEXT FILE:
In a text file, the data is stored in sequence of
lines, where each line is a sequence of
characters. The file is stored in ‘.txt’ format. It is
human readable and has an EOL character ‘\n’.
#BINARY FILE:
In a binary file, the data is stored in stream of
bytes. It is used to store data such as video or
audio files. The file is stored in ‘.dat’ format. It is
non-human readable and doesn’t have an EOL
character. #CSV FILE:
In a CSV file, the data is entered in the form of
comma separated values and stored in rows and
columns. It is used to store records. The file is
stored in ‘.csv’ format. It is somewhat human
readable and doesn’t have an EOL character.
USING DATA FILES:
# To handle the data files first we need to assign a file
handle to it.
# We can open the file with open() function using two
methods: f=open() and with open():
# We can open the file with 3 modes: ‘read’, ‘write’ and
‘append’
# Read mode is used to read the file # Methods of reading
text file are: read(), readline(n), readlines()
# Read() is used to select all the data in a file as a single
string
# Readline(n) is used to select a single line as a single string
# Readlines() is used to select all the lines as list of strings
where each string is a line
# Write mode is used to write In the file # Methods of
Writing In a file are: write() and writelines()
# Write() is used to write any content in the file #
Writelines() is used to write multiple lines in a list
# Append mode is used to write at the end of the existing
file
# Then we need to close the file using close() function
# TRY :
# EXCEPT:
MODULES:
# Time Module: to use sleep function for frontend
working
# CSV Module: to use csv file functions and store
data in csv file
# MySQL.connector Moddule: to add mysql
functions for db connectivity as backend working
FUNCTIONS:
# TIME: sleep()
# CSV: writer(), writerow()
#MYSQL.CONNECTOR:connect(),is_connected(),
cursor(),execute(), fetchall(),format(),commit() #
SQL: max(), min(), sum(), average(), count() # IN-
BUILT: int(), input(), len(), print(), range(), append()
SOURCE CODE
#STUDENTS MARKS MANAGEMENT
import mysql.connector as sql import
sys
try:
table=input("enter table name")
cursor.execute("desc %s"%table) for i in
cursor:
print(i) except:
print("sorry some error occured")
#DISPLAYING ALL RECORDS OF TABLE if
ch==4: try:
cursor.execute("select * from student") data=cursor.fetchall()
print("RollNo","Studentname","Class","Section",Subject1",
"Subject2","Subject3", "Subject4","Subject5","Total Marks"
"Percentage")
for i in data:
j=str(i).split() for k in j:
print(k,end=" ") print() except:
print("SORRY SOME ERROR OCCURED")
for k
in j:
print(k,end=" ") print()
except: print("SORRY SOME ERROR OCCURED")
db.close()
OUTPUT
Choice 1: Create table for first time
BIBLIOGRAPHY
To develop this project following
resources are used:
• Computer Science Textbook – Preeti
Arora (Sultan Chand)
• https://www.python.org/
• https://www.mysql.com/