Student Fees Management With MySQL
Student Fees Management With MySQL
1
syllaStudent Fees of C.B.S.E. Sr. Sec
Board.
Signature
Signature
Teacher’s Name
Principal ‘s Name
( PGT Computer Science )
( Principal )
Acknowledgement
2
inadequate to express my sincere &
deepest sense of gratitude to my guide
& teacher Enter Teacher’s Name for his
benevolent guidance, constructive
counsel, & meticulous supervision,
constant inspirations & wholehearted
encouragement throughout the year.
Enter Your
Name
3
4
Introduction to Project
This is a Project work constitutes some components used in most professional programs. This project
is undertaken in context of fulfillment of the requirement of AISSCE. I have tried my best to make
the complicated process of “Student Fees Management” as simple as possible using Structured &
Modular technique. I have tried to design the software in such a way that user may not have any
difficulty in using this package & further expansion is possible without much effort. Even though I
cannot claim that this work to be entirely exhaustive, the main purpose of my exercise is perform
“Student Fees Management” in computerized and efficient way rather than manually which is time
consuming.
I am confident that this software package can be readily used by non-programming personal
avoiding human handled chance of error.
The main aim of the entire activity is to automate the process of “Student Fees Management”.
The limited time and resources have restricted us to incorporate, in this project, only the main
activities that are performed in a “Student Fees Management”, but utmost care has been taken to
make the system efficient and user friendly. “Student Fees Management” has been designed to
computerize the following functions that are performed by the system:
OBJECTIVE
During the past several decades’ personnel function has been transformed from a relatively obscure
record keeping staff to central and top level management function. There are many factors that have
influenced this transformation like technological advances, professionalism, and general
recognition of human beings as most important resources.
A computer based “Student Fees Management” is designed to handle the primary activities of
the Student Fees Management to maintain the records of in an efficient way which save the time.
This project intends to introduce more user friendliness in the various activities such as addition
of records, editing the information and updation, maintenance, and searching the records.
5
Similarly, record maintenance and updation can also be accomplished by using the
identification of the id with all the details being automatically generated. These details are also
being promptly automatically updated in the master file thus keeping the record absolutely up-to-
date.
The entire information has maintained in the database or Files and whoever wants to retrieve
can’t retrieve, only authorization user can retrieve the necessary information which can be easily be
accessible from the file.
ADVANTAGE:
I have designed the given proposed system in the Python to automate the process of
“Student Fees Management” because it is an Object Oriented Language and good for application
softwares. This project is useful for the maintaining the records of Student Fees.
The following steps that give the detailed information of the need of proposed system are:
Performance: During past several decades, the records are supposed to be manually
handled for all activities. The manual handling of the record is time consuming and highly prone to
error. To improve the performance of the “Student Fees Management”, the computerized system is
to be undertaken. This project is fully computerized and user friendly.
Efficiency: The basic need of this software is efficiency. The software should be efficient so that
whenever a user performs his/her work the records are updated automatically. This record will be
useful for other transactions instantly.
Security: Security is the main criteria for the proposed system. Since illegal access may corrupt the
database. So security has to be given in this project.
This project can be used in the Student Fees Management after adding some more useful modules
in the project.
So there are many things for future enhancement of this project. The future enhancements that
are possible in the project are as follows.
6
Hardware and Software
Requirement
Hardware Required
Memory
64 MB Minimum; 128 MB Recommended
(RAM)
Pointing
Microsoft Mouse or compatible
device
Software Required
Software Description
Operating
Microsoft Windows or DOS or Linux or Unix
System
Python
Anaconda / Python 3.7
Interpreter
7
RDBMS MySQL 5.5
MS – Office /
Word Processor for Documentation
Open Office
8
Introduction to Python Programming
Python is a high-level, interpreted, interactive and object oriented-scripting language. Python was
designed to be highly readable which uses English keywords frequently where as other languages use
punctuation and it has fewer syntactical constructions than other languages.
Python is interpreted: This means that it is processed at runtime by the interpreter and
you do not need to compile your program before executing it. This is similar to PERL and PHP.
Python is Interactive: This means that you can actually sit at a Python prompt and
interact with the interpreter directly to write your programs.
History of Python:
Python was developed by Guido van Rossum in the late eighties and early nineties ( February 1991 ) at
the National Research Institute for Mathematics and Computer Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68,
SmallTalk, and UNIX shell and other scripting languages.
Python is now maintained by a core development team at the institute, although Guido van
Rossum still holds a vital role in directing its progress.
Easy-to-read: Python code is much more clearly defined and visible to the eyes.
9
A broad standard library: One of Python's greatest strengths is the bulk of the library
is very portable and cross-platform compatible on UNIX, Windows, and Macintosh.
Interactive Mode: Support for an interactive mode in which you can enter results from a
terminal right to the language, allowing interactive testing and debugging of snippets of code.
Portable: Python can run on a wide variety of hardware platforms and has the same interface
on all platforms.
Extendable: You can add low-level modules to the Python interpreter. These modules enable
programmers to add to or customize their tools to be more efficient.
GUI Programming: Python supports GUI applications that can be created and ported to
many system calls, libraries, and windows systems, such as Windows MFC, Macintosh, and the X
Window system of Unix.
Scalable: Python provides a better structure and support for large programs than shell
scripting.
Apart from the above mentioned features, Python has a big list of good features, few are listed below:
It can be used as a scripting language or can be compiled to byte-code for building large
applications.
Very high-level dynamic data types and supports dynamic type checking.
It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
MySQL
MySQL is an open-source relational database management system (RDBMS). Its name is a combination of
"My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured
Query Language.
MySQL is free and open-source software under the terms of the GNU General Public License, and is also
available under a variety of proprietary licenses. MySQL was owned and sponsored by
the Swedish company MySQL AB, which was bought by Sun Microsystems (now Oracle Corporation). In
2010, when Oracle acquired Sun, Widenius forked the open-source MySQL project to create MariaDB.
10
Sometime, it is important to store the information entered by the user into the database for further use.
After storing the information into the database, later we can retrieve those information from that
database. The latest version of MySQL is one of the world’s most popular databases. It is open source,
reliable, compatible with all major hosting providers, cost-effective, and easy to manage. Many
organizations are leveraging the data security and strong transactional support offered by MySQL to
secure online transactions and enhance customer interactions. However, enterprises using MySQL are
presented with several challenges when their apps experience exponential growth and they need
additional scale.
Along with understanding why MySQL is the go-to solution for high-growth environments, it is equally
important to understand the challenges that can cripple your Student Feesiness operations. Here are 5 major
reasons to use MySQL along with its most common challenges:
On-Demand Scalability
MySQL comes with the advantage of unmatched flexibility that facilitates efficient management of deeply
embedded applications, even in gigantic data centers that stack tremendous amounts of mission-critical
information. It enables complete customization to cater to the unique requirements of eCommerce Student
Feesinesses with a much smaller footprint.
High Availability
Consistent availability is the stalwart feature of MySQL – enterprises that deploy it can enjoy round-the-
clock uptime. MySQL comes with a wide variety of cluster servers and master-slave replication
configurations that enable instant failover for uninterrupted access.
Rock-Solid Reliability
Protecting sensitive Student Feesiness information is the primary concern of every enterprise. MySQL
ensures data security with exceptional data protection features. Powerful data encryption prevents
unauthorized viewing of data and SSH and SSL supports ensure safer connections. It also features a
powerful mechanism that restricts server access to authorized users and has the ability to block users even at
the man-machine level. Finally, the data backup feature facilitates point-in-time recovery.
Quick-Start Capability
You can go from software download to complete installation in just 15 minutes. MySQL is exceptionally
quick, regardless of the underlying platform. It features self-management capabilities like auto restart, spass
expansion and automatic configuration changes for ease of management. MySQL enables real-time
performance monitoring for timely troubleshooting of operational issues from a single workstation.
Replication
MySQL servers often run into replication conflicts during a manual failover when multi-master setups are
involved.
11
Database Logging Costs
Database logging is expensive and so it remains disabled most of the time. As a result, organizations lack
real-time visibility into slow logs, which delays troubleshooting.
Query Caches
MySQL server query cache is of little help when handling a high volume of workload, because cache
invalidation cannot be controlled.
12
Modules Imported in the Projects
And Their Functions
Other than Python Standard Library modules, some other modules are imported in the
project to perform some specific task. These are :
mysql.connector
connect( ) – To connect to the MySQL database
os
remove( ) – To remove a file
remame( ) – To rename a file
datetime
today( ) – To return current system date
sys
exit( ) – To terminate execution of the program
13
14
# ************** Project on Student Fees Management System ********************
import datetime as dt
import mysql.connector as ms
import os
import sys
def welcome():
print("\n\n******************* W E L C O M E *********************\n\n ")
print(" STUDENT FEES MANAGEMENT SYSTEM")
print(" \n D E V E L O P E D B Y :\n")
print(" Enter Your Name Here")
print(" XII - Section")
print(" Enter Your School Name Here")
print(" Your City\n")
def INTRO():
intro = '''
---------------------------------------------------------------------------
WELCOME TO STUDENT FEES MANAGEMENT
__________________________________________________________
This project is developed to manage the records of the fees.
def ADDDATA():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
15
print('[ NO DATABASE FOUND ]')
return
cursor = conobj.cursor()
ch = 'y'
while ch == 'y' or ch == 'Y':
print('Enter Student Details : ')
print('--------------------- ')
nm = input("Enter Name : ")
cl = input("Enter Class : ")
sc = input("Enter Section : ")
try:
st = "insert into student(name, class, stream) values('{}', '{}', '{}' )".format(nm,
cl, sc)
cursor.execute(st)
conobj.commit()
print("\n\nRECORD ADDED SUCCESSFULLY\n")
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
ch = input("Press y to add more records : ")
conobj.close()
def DISPLAYDATA():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
cursor = conobj.cursor()
try:
st = "select * from student order by id"
cursor.execute(st)
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
d = cursor.fetchone()
f=0
print("\n\t\t\t\tLIST OF StudentS \n")
while d is not None:
f=1
print("---------------------------------------------------------------------------------------")
print("Student's ID : ", d[0])
print("Name : ", d[1])
print("Class : ", d[2])
print("Section : ", d[3])
print("---------------------------------------------------------------------------------------")
d = cursor.fetchone()
conobj.close()
if f == 0:
print("\n\nNo Record Exist\n")
def SEARCHDATA():
try:
16
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
cursor = conobj.cursor()
try:
i = int(input("Enter Student ID : "))
st = "select * from student where id = {}".format(i)
cursor.execute(st)
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
d = cursor.fetchone()
if d is not None:
print("\n\t\t\t\t[ SEARCH RESULT ... ]\n")
print("---------------------------------------------------------------------------------------")
print("Student's ID : ", d[0])
print("Name : ", d[1])
print("Class : ", d[2])
print("Section : ", d[3])
print("---------------------------------------------------------------------------------------")
print("Fees of 1st Quarter : ", 'Rs,', d[4])
print("Fine of 1st Quarter : ", 'Rs,', d[6])
print("Fees of 2nd Quarter : ", 'Rs,', d[7])
print("Fine of 2nd Quarter : ", 'Rs,', d[9])
print("Fees of 3rd Quarter : ", 'Rs,', d[10])
print("Fine of 3rd Quarter : ", 'Rs,', d[12])
print("Fees of 4th Quarter : ", 'Rs,', d[13])
print("Fine of 4th Quarter : ", 'Rs,', d[15])
print("---------------------------------------------------------------------------------------")
print("Annual Fees : ", 'Rs,', d[16])
print("Total Fees Paid : ", 'Rs,', d[17])
print("Balance Fees : ", 'Rs,', d[16]-d[17])
print("---------------------------------------------------------------------------------------")
print("Total Fine Paid : ", 'Rs,', d[6]+d[9]+d[12]+d[15])
print("---------------------------------------------------------------------------------------")
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
def EDITDATA():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
cursor = conobj.cursor()
try:
i = int(input("Enter Student ID : "))
st = "select * from student where id = {}".format(i)
cursor.execute(st)
17
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
d = cursor.fetchone()
if d is not None:
print("\n\t\t\t\t[ MODIFYING RECORDS ]\n")
n = input("Enter new Name or press 0 to unchange : ")
if n !='0':
st = "update student set name = '{}' where id = {}".format(n, i)
cursor.execute(st)
conobj.commit()
n = input("Enter new Class or press 0 to unchange : ")
if n !='0':
st = "update student set class = '{}' where id = {}".format(n, i)
cursor.execute(st)
conobj.commit()
n = input("Enter new Section or press 0 to unchange : ")
if n !='0':
st = "update student set section = '{}' where id = {}".format(n, i)
cursor.execute(st)
conobj.commit()
conobj.close()
print("\n\nRecord Modified Successfully\n")
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
def REMOVEDATA():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
try:
i = int(input("Enter Student's ID : "))
st = "select * from student where id = {}".format(i)
cursor.execute(st)
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
d = cursor.fetchone()
if d is not None:
print("\n\t\t\t\t[ STUDENT'S DETAILS ]\n")
print("---------------------------------------------------------------------------------------")
print("Student's ID : ", d[0])
print("Name : ", d[1])
print("Class : ", d[2])
print("Section : ", d[3])
print("---------------------------------------------------------------------------------------")
ch = input("Press Y/y to delete the record")
if ch in 'Yy':
st = "delete from student where id = {}".format(i)
cursor.execute(st)
18
conobj.commit()
print("\n\nRecord Deleted Successfully\n")
else:
print('Deletion Process Cancelled..')
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
def ADDFEES():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
while True:
cl = input("Enter Class : ")
sm = input("Enter Sction/Stream : ")
af = int(input("Enter Annual Fees : Rs,"))
st = "insert into fees(classf, stream, annualfees) values('{}','{}',
{})".format(cl,sm,af)
cursor.execute(st)
st = "update student set annualfees={} where class='{}' and
stream='{}'".format(af, cl, sm)
cursor.execute(st)
conobj.commit()
print('[ Fees Record Added Successfully ]')
ch = input('Press Y to add more records : ')
if ch not in 'Yy':
break
conobj.close()
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
def DISPLAYFEES():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
st = "select * from fees"
cursor.execute(st)
d = cursor.fetchone()
f=0
print("\n\t\t\t\t CLASS FESS DETAILS \n")
while d is not None:
f=1
print("Sr.No. Class Section/Stream Annual Fees Qtr. Fees")
print("---------------------------------------------------------------------------------")
print(d[0],"\t ", d[1],"\t\t ", d[2],"\t\t Rs,", d[3],"\t Rs,", d[3]//4)
print("---------------------------------------------------------------------------------------")
d = cursor.fetchone()
conobj.close()
if f == 0:
print("\n\nNo Record Exist\n")
except ms.ProgrammingError:
19
print('[ NO DATABASE FOUND ]')
return
def MODIFYFEES():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
i = int(input("Enter Serial Number of Class: "))
st = "select * from fees where sr = {}".format(i)
cursor.execute(st)
d = cursor.fetchone()
if d is not None:
print("\n\t\t\t\t[ MODIFYING FEES RECORDS ]\n")
n = input("Enter Class Name or press 0 to unchange : ")
if n !='0':
st = "update fees set classf = '{}' where sr = {}".format(n, i)
cursor.execute(st)
conobj.commit()
n = input("Enter new Section / Stream or press 0 to unchange : ")
if n !='0':
st = "update fees set stream = '{}' where sr = {}".format(n, i)
cursor.execute(st)
conobj.commit()
n = input("Enter new Annual Fees or press 0 to unchange : ")
if n !='0':
st = "update fees set annualfees = {} where sr = {}".format(int(n), i)
cursor.execute(st)
conobj.commit()
print("\n\nRecord Modified Successfully\n")
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
def SEARCHFEES():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
print('[SEARCH OPTION]')
print('1. Search Using Serial Number ID')
print('2. Search Using Class')
ch = input('Enter your choice : ')
if ch == '1':
i = int(input("Enter Serial Number : "))
cursor.execute("select * from fees where sr={}".format(i))
elif ch == '2':
c = input('Enter Class : ')
cursor.execute("select * from fees where classf='{}'".format(c))
else:
print('[ Invalid Choice ]')
20
return
f=0
print("\n\t\t\t\t[ SEARCH RESULT ... ]\n")
while d is not None:
f=1
print("---------------------------------------------------------------------------------------")
print("Sr.No. : ", d[0],end=' ')
print("Class : ", d[1],end=' ')
print("Section/Stream : ", d[2],end=' ')
print("Annual Fees : Rs,", d[3], end=' ')
print("Quarterly Installment : Rs,", d[3]//4)
print("---------------------------------------------------------------------------------------")
d = cursor.fetchone()
if f == 0:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
def FEESPAYMENT():
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
cursor = conobj.cursor()
try:
i = int(input("Enter Student's ID : "))
st = "select id, name, class, stream, q1, q2, q3, q4, annualfees from student where id
= {}".format(i)
cursor.execute(st)
except ms.ProgrammingError:
print('[ NO TABLE EXIST ]')
return
d = cursor.fetchone()
if d is not None:
print("\n\t\t\t\t[ STUDENT'S DETAILS ]\n")
print("---------------------------------------------------------------------------------------")
print("Student's ID : ", d[0])
print("Name : ", d[1])
print("Class : ", d[2])
print("Section : ", d[3])
print("---------------------------------------------------------------------------------------")
ch = input('Press Y/y to confirm student : ')
if ch in 'Yy':
print("Annual Fees : Rs,", d[8])
print("Quarterly Fee Installment : Rs,", d[8]//4)
print("---------------------------------------------------------------------------------------")
ii = int(input('Enter the instalment number (1/2/3/4) : '))
if ii==1:
fn=0
21
if mm>4:
fn=500
print("Fine of Late Fees Payment : Rs,", fn)
print("Net Amount of Fees Installment to be Paid : Rs,", d[8]//4+fn)
ch = input('Press Y/y to Pay the installment : ')
if ch in 'Yy':
t = d[4]+d[5]+d[6]+d[7]+d[8]//4
st = "update student set q1={}, d1='{}', f1={}, totalpaid={}, s1='PAID' where
id = {}".format(d[8]//4,di,fn,t,i)
cursor.execute(st)
conobj.commit()
elif ii==2:
fn=0
if mm>7:
fn=500
print("Fine of Late Fees Payment : Rs,", fn)
print("Net Amount of Fees Installment to be Paid : Rs,", d[8]//4+fn)
ch = input('Press Y/y to Pay the installment : ')
if ch in 'Yy':
t = d[4]+d[5]+d[6]+d[7]+d[8]//4
st = "update student set q2={}, d2='{}', totalpaid={}, s2='PAID' where id =
{}".format(d[8]//4,di,fn,t,i)
cursor.execute(st)
conobj.commit()
elif ii==3:
fn=0
if mm>10:
fn=500
print("Fine of Late Fees Payment : Rs,", fn)
print("Net Amount of Fees Installment to be Paid : Rs,", d[8]//4+fn)
ch = input('Press Y/y to Pay the installment : ')
if ch in 'Yy':
t = d[4]+d[5]+d[6]+d[7]+d[8]//4
st = "update student set q3={}, d3='{}', f3={}, totalpaid={}, s3='PAID' where
id = {}".format(d[8]//4,di,fn,t,i)
cursor.execute(st)
conobj.commit()
elif ii==4:
fn=0
if mm>1:
fn=500
print("Fine of Late Fees Payment : Rs,", fn)
print("Net Amount of Fees Installment to be Paid : Rs,", d[8]//4+fn)
ch = input('Press Y/y to Pay the installment : ')
if ch in 'Yy':
t = d[4]+d[5]+d[6]+d[7]+d[8]//4
st = "update student set q4={}, d4='{}', f4={}, totalpaid={}, s4='PAID' where
id = {}".format(d[8]//4,di,fn,t,i)
cursor.execute(st)
conobj.commit()
else:
print('Invalid Entry')
return
conobj.close()
22
print("\n\nFees Payment is Successfully\n")
ch = input('Press P/p to print the fee slip : ')
if ch in 'Pp':
PRINTSLIP(i)
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
def PRINTSLIP(i=0):
if i==0:
i = int(input("Enter Student ID : "))
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
st = "select * from student where id = {}".format(i)
cursor.execute(st)
d = cursor.fetchone()
if d is not None:
print(" FEE SLIP ")
print("---------------------------------------------------------------------------------------")
print("Student's ID : ", d[0])
print("Name : ", d[1])
print("Class : ", d[2])
print("Section : ", d[3])
print("---------------------------------------------------------------------------------------")
print("Fees of 1st Quarter : ", 'Rs,', d[4])
print("Fees of 2nd Quarter : ", 'Rs,', d[7])
print("Fees of 3rd Quarter : ", 'Rs,', d[10])
print("Fees of 4th Quarter : ", 'Rs,', d[13])
print("---------------------------------------------------------------------------------------")
print("Annual Fees : ", 'Rs,', d[16])
print("Total Fees Paid : ", 'Rs,', d[17])
print("Balance Fees : ", 'Rs,', d[16]-d[17])
print("---------------------------------------------------------------------------------------")
else:
print("\n\nRecord Not Found For This ID\n")
conobj.close()
except ms.ProgrammingError:
print('[ NO DATABASE FOUND ]')
return
def CHANGEPASSWORD():
try:
file = open('pd.txt', 'r')
except FileNotFoundError:
print("Your OTP is 123")
n = input("Enter OTP : ")
if n == '123':
a = input("Enter New Password : ")
b = input("Re-Enter New Password : ")
if a == b:
with open('pd.txt', 'w') as file2:
file2.write(a)
23
print("\n[ PASSWORD RESET SUCCESSFULLY ]")
return
try:
n = input("Enter Old Password : ")
data = file.read()
if n == data:
a = input("Enter New Password : ")
b = input("Re-Enter New Password : ")
if a == b:
with open('temp.txt', 'w') as file2:
file2.write(a)
print("\n[ PASSWORD RESET SUCCESSFULLY ]")
file.close()
os.remove('pd.txt')
os.rename('temp.txt','pd.txt')
except EOFError :
file.close()
def ADMIN():
try:
file = open('pd.txt', 'r')
except FileNotFoundError:
CHANGEPASSWORD()
try:
file = open('pd.txt', 'r')
d = file.read()
file.close()
n = input("Enter Password : ")
if n == d:
while True:
print("---------------------------------------------------------------------------------------")
print("[ A D M I N P O R T A L ]\n")
print("1. ENROLL STUDENT")
print("2. DISPLAY STUDENT")
print("3. EDIT STUDENT")
print("4. SEARCH STUDENT")
print("5. REMOVE STUDENT")
print("---------------------------------------------------------------------------------------")
print("6. FEES ALLOCATION")
print("7. DISPLAY FEES MODULE")
print("8. EDIT FEES")
print("9. SEARCH FEES")
print("---------------------------------------------------------------------------------------")
print("P. CHANGE PASSWORD")
print("0. BACK TO MAIN MENU")
ch = input("Enter your choice : ")
print("---------------------------------------------------------------------------------------")
if ch == '1':
ADDDATA()
if ch == '2':
DISPLAYDATA()
elif ch == '3':
EDITDATA()
elif ch == '4':
24
SEARCHDATA()
elif ch == '5':
REMOVEDATA()
elif ch == '6':
ADDFEES()
elif ch == '7':
DISPLAYFEES()
elif ch == '8':
MODIFYFEES()
elif ch == '9':
SEARCHFEES()
elif ch == 'P' or ch == 'p':
CHANGEPASSWORD()
elif ch == '0':
break
else:
print("Invalid Choice")
else:
print("[ ACCESS DENIED ]")
except EOFError :
file.close()
def FEESMODULE():
while True:
print("---------------------------------------------------------------------------------------")
print("[ F E E S P O R T A L ]\n")
print("1. FEES PAYMENT")
print("2. SEARCH STUDENT")
print("3. PRINT FEE SLIP")
print("0. BACK TO MAIN MENU")
ch = input("Enter your choice : ")
print("---------------------------------------------------------------------------------------")
if ch == '1':
FEESPAYMENT()
elif ch == '2':
SEARCHSTUDENT()
elif ch == '3':
PRINTSLIP()
elif ch == '0':
break
else:
print("Invalid Choice")
#-------------------MAIN----------------------------------------
try:
pd = input('Enter Password of Your MySQL Client : ')
conobj = ms.connect(host="localhost", user="root", password=pd)
except ms.errors.ProgrammingError:
sys.exit('Unable to Establish Connection With MySQL Client')
cursor = conobj.cursor()
try:
st = "create database SCHOOL"
cursor.execute(st)
conobj.commit()
except ms.DatabaseError:
25
conobj.close()
try:
conobj = ms.connect(host="localhost", user="root", password=pd,
database="SCHOOL")
cursor = conobj.cursor()
st = "create table if not exists student(id integer primary key auto_increment, name
varchar(100), class varchar(10), stream varchar(10), q1 integer default 0, d1 date, f1
integer default 0, q2 integer default 0, d2 date, f2 integer default 0, balance integer
default 0, s1 varchar(20) default 'Un-Paid', s2 varchar(20) default 'Un-Paid', s3
varchar(20) default 'Un-Paid', s4 varchar(20) default 'Un-Paid')"
cursor.execute(st)
conobj.commit()
st = "create table if not exists fees(sr integer primary key auto_increment, classf
varchar(10), stream varchar(10), annualfees integer default 0, qtr integer default 0)"
cursor.execute(st)
conobj.commit()
conobj.close()
except ms.ProgrammingError:
conobj.close()
welcome()
while True:
print("[ M A I N M E N U ]\n")
print("1. ADMIN PORTAL")
print("2. FEES PORTAL")
print("0. EXIT")
ch = input("Enter your choice : ")
print("---------------------------------------------------------------------------------------")
if ch == '1' :
ADMIN()
elif ch == '2':
FEESMODULE()
elif ch == '0':
break
else:
print("Invalid Choice")
print("Thank You")
26
27
Enter Password of Your MySQL Client : pass
******************* W E L C O M E *********************
STUDENT FEES MANAGEMENT SYSTEM
DEVELOPED BY:
Enter Your Name Here
XII - Section
Enter Your School Name Here
Your City
[MAIN MENU]
1. ADMIN PORTAL
2. FEES PORTAL
0. EXIT
Enter your choice : 1
---------------------------------------------------------------------------------------
Your OTP is 123
Enter OTP : 123
Enter New Password : 111
Re-Enter New Password : 111
1. ENROLL STUDENT
2. DISPLAY STUDENT
3. EDIT STUDENT
4. SEARCH STUDENT
5. REMOVE STUDENT
---------------------------------------------------------------------------------------
6. FEES ALLOCATION
7. DISPLAY FEES MODULE
8. EDIT FEES
9. SEARCH FEES
---------------------------------------------------------------------------------------
P. CHANGE PASSWORD
0. BACK TO MAIN MENU 28
Enter your choice : 1
---------------------------------------------------------------------------------------
Enter Student Details :
---------------------
Enter Name : Amit
Enter Class : 12
Enter Section : Sc
RECORD ADDED SUCCESSFULLY
1. ENROLL STUDENT
2. DISPLAY STUDENT
3. EDIT STUDENT
4. SEARCH STUDENT
5. REMOVE STUDENT
---------------------------------------------------------------------------------------
6. FEES ALLOCATION
7. DISPLAY FEES MODULE
8. EDIT FEES
9. SEARCH FEES
---------------------------------------------------------------------------------------
P. CHANGE PASSWORD
0. BACK TO MAIN MENU
Enter your choice : 2
---------------------------------------------------------------------------------------
LIST OF StudentS
---------------------------------------------------------------------------------------
Student's ID : 1
Name : Amit
Class : 12
Section : Sc
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Student's ID : 2
Name : Mohit
Class : 11
Section : Sc
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Student's ID : 3
Name : Pooja
Class : 12
Section : Com
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Student's ID : 4
Name : Renu
Class : 12
Section : Sc
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Student's ID : 5
Name : Deepak
Class : 11
Section : Com
---------------------------------------------------------------------------------------
30
[ADMIN PORTAL]
1. ENROLL STUDENT
2. DISPLAY STUDENT
3. EDIT STUDENT
4. SEARCH STUDENT
5. REMOVE STUDENT
---------------------------------------------------------------------------------------
6. FEES ALLOCATION
7. DISPLAY FEES MODULE
8. EDIT FEES
9. SEARCH FEES
---------------------------------------------------------------------------------------
Enter your choice : 4
P. CHANGE PASSWORD
---------------------------------------------------------------------------------------
0. BACK
Enter StudentTO MAIN
ID : 1 MENU
Enter your choice : 3 [ SEARCH RESULT ... ]
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Enter Student
Student's ID : ID
1 :1
Name : Rajesh [ MODIFYING RECORDS ]
Class : 11
Enter
Sectionnew :NameComor press 0 to unchange : Rajesh
Enter new Class or press 0 to unchange : 11
---------------------------------------------------------------------------------------
Enter
Fees ofnew1st Section/Stream
Quarter : Rs, 0orSubmitted
press 0 toon unchange
: None : Com
Record Modified Successfully
Fine of 1st Quarter : Rs, 0
Fees of 2nd Quarter : Rs, 0 Submitted on : None
Fine of 2nd Quarter : Rs, 0
Fees of 3rd Quarter : Rs, 0 Submitted on : None
Fine of 3rd Quarter : Rs, 0
Fees of 4th Quarter : Rs, 0 Submitted on : None
Fine of 4th Quarter : Rs, 0
---------------------------------------------------------------------------------------
Annual Fees : Rs, 0
Total Fees Paid : Rs, 0
Balance Fees : Rs, 0
--------------------------------------------------------------------------------------- 31
Total Fine Paid : Rs, 0
---------------------------------------------------------------------------------------
Enter your choice : 5
---------------------------------------------------------------------------------------
Enter Student's ID : 2
[ STUDENT'S DETAILS ]
---------------------------------------------------------------------------------------
Student's ID : 2
Name : Mohit
Class : 11
Section : Sc
---------------------------------------------------------------------------------------
Press Y/y
Enter yourtochoice
delete:the
2 recordy
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Student's ID : 1 Name : Rajesh Class : 11 Section : Com
---------------------------------------------------------------------------------------
Student's ID : 3 Name : Pooja Class : 12 Section : Com
---------------------------------------------------------------------------------------
Student's ID : 4 Name : Renu Class : 12 Section : Sc
---------------------------------------------------------------------------------------
Student's ID : 5 Name : Deepak Class : 11 Section : Com
---------------------------------------------------------------------------------------
32
[ADMIN PORTAL]
1. ENROLL STUDENT
2. DISPLAY STUDENT
3. EDIT STUDENT
4. SEARCH STUDENT
5. REMOVE STUDENT
---------------------------------------------------------------------------------------
6. FEES ALLOCATION
7. DISPLAY FEES MODULE
8. EDIT FEES
9. SEARCH FEES
---------------------------------------------------------------------------------------
P. CHANGE PASSWORD
0. BACK TO MAIN MENU
Enter your choice : 6
---------------------------------------------------------------------------------------
Enter Class : 12
Enter Sction/Stream : Sc
Enter Annual Fees : Rs,50000
[ Fees Record Added Successfully ]
Press Y to add more records : y
Enter Class : 12
Enter Sction/Stream : Com
Enter Annual Fees : Rs,40000
[ Fees Record Added Successfully ]
Press Y to add more records : y
Enter Class : 11
Enter Sction/Stream : Sc
Enter Annual Fees : Rs,30000
[ Fees Record Added Successfully ]
Press Y to add more records : y
Enter Class : 11
Enter Sction/Stream : Com
Enter Annual Fees : Rs,20000
[ Fees Record Added Successfully ]
Press Y to add more records : n
---------------------------------------------------------------------------------------
33
Enter your choice : 7
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
34
Enter your choice : 7
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Sr.No. : 1 Class : 12 Section/Stream : Sc Annual Fees : Rs, 60000 Quarterly
Installment : Rs, 15000
---------------------------------------------------------------------------------------
35
[ADMIN PORTAL]
1. ENROLL STUDENT
2. DISPLAY STUDENT
3. EDIT STUDENT
4. SEARCH STUDENT
5. REMOVE STUDENT
---------------------------------------------------------------------------------------
6. FEES ALLOCATION
7. DISPLAY FEES MODULE
8. EDIT FEES
9. SEARCH FEES
---------------------------------------------------------------------------------------
P. CHANGE PASSWORD
0. BACK TO MAIN MENU
Enter your choice : 9
---------------------------------------------------------------------------------------
[SEARCH OPTION]
1. Search Using Serial Number ID
2. Search Using Class
Enter your choice : 2
Enter Class : 12
---------------------------------------------------------------------------------------
Sr.No. : 1 Class : 12 Section/Stream : Sc Annual Fees : Rs, 60000 Quarterly
Installment : Rs, 15000
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
Sr.No. : 2 Class : 12 Section/Stream : Com Annual Fees : Rs, 40000 Quarterly
Installment : Rs, 10000
---------------------------------------------------------------------------------------
36
[MAIN MENU]
1. ADMIN PORTAL
2. FEES PORTAL
0. EXIT
Enter your choice : 2
---------------------------------------------------------------------------------------
[FEES PORTAL]
1. FEES PAYMENT
2. SEARCH STUDENT
3. PRINT FEE SLIP
0. BACK TO MAIN MENU
Enter your choice : 1
---------------------------------------------------------------------------------------
Enter Student's ID : 1
[ STUDENT'S DETAILS ]
---------------------------------------------------------------------------------------
Student's ID : 1
Name : Rajesh
Class : 11
Section : Com
---------------------------------------------------------------------------------------
Press Y/y to confirm student : y
Annual Fees : Rs, 20000
Quarterly Fee Installment : Rs, 5000
---------------------------------------------------------------------------------------
Enter the instalment number (1/2/3/4) : 1
Fine of Late Fees Payment : Rs, 500
Net Amount of Fees Installment to be Paid : Rs, 5500
Press Y/y to Pay the installment : y
1. FEES PAYMENT
2. SEARCH STUDENT
3. PRINT FEE SLIP
0. BACK TO MAIN MENU
Enter your choice : 1
---------------------------------------------------------------------------------------
Enter Student's ID : 1
[ STUDENT'S DETAILS ]
---------------------------------------------------------------------------------------
Student's ID : 1
Name : Rajesh
Class : 11
Section : Com
---------------------------------------------------------------------------------------
Press Y/y to confirm student : y
Annual Fees : Rs, 20000
Quarterly Fee Installment : Rs, 5000
---------------------------------------------------------------------------------------
Enter the instalment number (1/2/3/4) : 2
Fine of Late Fees Payment : Rs, 500
Net Amount of Fees Installment to be Paid : Rs, 5500
Press Y/y to Pay the installment : y
Books Referred
41
www.google.com
www.studytonight.com
www.pythonprogramming.com
42