INDIAN CENTRAL SCHOOL
KUWAIT
COMPUTER SCIENCE
PROJECT RECORD
NAME: Farhan Monirul Islam
CLASS: XII -A
SUBJECT: Computer Science (083)
PROJECT TOPIC: Sports Management System
YEAR: 2024-2025
INDIAN CENTRAL SCHOOL
KUWAIT
BONAFIDE CERTIFICATE
This is certified to be the Bonafide work done by Farhan Monirul Islam
Reg. No: _____________, of Class XII Division A in COMPUTER SCIENCE
(083) during the year 2024-2025.
Internal Examiner Head of The Department Principal
Teacher’s Code _____________
Submitted for Senior Secondary Certificate Examination Practical held at Indian
Central School, Kuwait on _______/ _______ / 20______.
SCHOOL SEAL External Examiner
TEACHER’S CODE:
DECLARATION
This is to certify that the Project work titled “Sports Management
System “submitted for the Senior Secondary Certificate Practical
Examination conducted at Indian Central School, Kuwait is a
record of my original work under the guidance of Mrs. K.
Vijayalakshmi in the year 2024- 2025.
ACKNOWLEDGEMENT
I express my sincere thanks to Mrs. K.Vijayalakshmi , my subject Teacher for
her guidance and invaluable suggestions.
Let me thank my School Principal Mrs. Sujata Sivakrishnan for her mentoring
and for providing me with all the facilities in the school for timely Project
completion.
I also place on record my gratitude to my classmates and my Parents for their
encouragement and motivation.
_
INDEX
_
SNO. CONTENT PAGE NO.
1. THEORY OF THE PROJECT
HARDWARE AND SOFTWARE SPECIFICATIONS
2.
3. ABOUT THE PROJECT
SOURCE CODE
4.
5. OUTPUT
6. BIBLIOGRAPHY
7. CONCLUSION
PROJECT THEORY
Python and MySQL
Python Overview
Python is a versatile and powerful programming language created by Guido
van Rossum at CWI (Centrum Wiskunde & Informatica), the National
Research Institute for Mathematics and Computer Science in the
Netherlands. Released in 1991, Python is free, open-source, and named
after the 1970s BBC comedy series “Monty Python’s Flying Circus.”
Key features contributing to Python's popularity include:
• Widely Used: Python is the most popular high-level, multi-purpose
programming language today.
• General Purpose: It can be used in both scientific and non-scientific
fields.
• Platform Independent: Python works seamlessly across different
operating systems.
• User-Friendly: Known for its simplicity, Python has a vast library of
modules, making it beginner-friendly and suitable for immediate
execution, as it's interpreted.
• Readable Code: Python code is highly readable, compact, and
requires less typing due to enforced indentation.
• Flexible Paradigms: Python supports both object-oriented and
procedural programming.
Python is used extensively by major companies and organizations for
various applications:
• Tech Giants: Google, Amazon, Facebook, Instagram, Dropbox, Uber,
and others use Python for core functionalities.
• Hardware Testing: Companies like Intel, Cisco, HP, and IBM employ
Python for hardware testing.
• Scientific Programming: Organizations such as NASA use Python
for scientific research and programming.
• Robotics: iRobot leverages Python to develop commercial robots.
MySQL Overview
MySQL (My Structured Query Language) is a widely-used open-source
relational database management system (RDBMS). Developed by Michael
Widenius, its logo is a dolphin named "Sakila." MySQL is known for its
speed, reliability, and scalability.
Key Features of MySQL:
1. Speed: MySQL processes queries very quickly.
2. Free and Open Source: It can be downloaded and used at no cost.
3. Ease of Use: MySQL is a high-performance and relatively simple
database system, manageable via the command line.
4. Portability: It operates on multiple CPUs and platforms.
5. Scalability: Capable of handling extensive databases, with support
for up to 60,000 tables and 50 million records.
6. Security: Offers a secure privilege and password system, enabling
host-based verification.
7. Data Types: Provides a range of data types to accommodate various
data needs.
Python – MySQL Connectivity
In application development, front-end refers to the user interface, while
back-end includes the server, application, and database that process user
requests.
Examples:
• Front-end languages: PHP, Java, Python
• Back-end databases: MySQL, SQL Server, PostgreSQL, Oracle
To connect Python to MySQL, the mysql.connector library is required. The
steps for creating a Python application with MySQL connectivity are:
1. Start Python.
2. Import the necessary database programming packages.
3. Open a database connection.
4. Create a cursor instance.
5. Execute SQL queries.
6. Retrieve data from the result set.
7. Clean up the environment after use.
HARDWARE AND SOFTWARE SPECIFICATIONS
Hardware requirements:
• Processor: Any modern processor (Intel i3 or AMD Ryzen 3 and
above) for smooth performance.
• RAM: At least 4 GB is functional, but 8 GB or more is recommended
for better performance, especially if working with larger datasets or
running multiple applications.
• Storage: Minimum 500 MB of free storage for Python, MySQL, and
additional libraries (more space may be required for large databases
or projects).
• Display: VGA/SVGA will work, but a modern display (HD or Full HD)
is recommended for a better interface experience.
Software Requirements:
• Operating System: Windows 10 or above.
• Python: Python 3.8 or above/
• IDE (Spyder or others): Spyder is compatible, but one may also
consider using Visual Studio Code, PyCharm, or Jupyter Notebook,
which offer robust support for Python.
• MySQL: MySQL 5.5 or above
About the Project: Sports Management System
This Sports Management System project is designed to streamline the
management of Sports records by providing a user-friendly interface for
interacting with a MySQL database. The system allows users to add, delete,
modify, search, and display Sports records efficiently.
Key Functions of the Program:
1. Display All Records: View a complete list of Sports records.
2. Display Records by Criteria: Search and display records based on
specific criteria.
3. Add a Record: Insert new sports information into the database.
4. Modify a Record: Update existing sports details as needed.
5. Delete a Record: Remove an Sports's information from the database.
This program simplifies Sports data management and enhances data
accessibility within the organization.
Name of the Database: test1
Name of the Table: sports
Structure of the table:
Table: sports
Stock
SOURCE CODE
# Project - SPORTS MANAGEMENT
# Done by – Farhan Monirul Islam
# Regn no-
# Class: XII-A (2024-2025)
import mysql.connector as sql
mycon=sql.connect(host='localhost', user='root', passwd='12345')
if mycon.is_connected() == False:
print("\t... Error Connecting to Mysql Database")
cursor=mycon.cursor()
cursor.execute("create database if not exists test1")
cursor=mycon.cursor()
cursor.execute("use test1")
cursor.execute("create table if not exists Sports(student_id varchar(20), student_name
varchar(20), age int, sports_name varchar(20), DOA date, Fees float, Gender
varchar(10))")
#1. Adding Records to Table -Sports
def Insert_Rec():
while True :
Student_id=input("Enter the Student No : ")
Student_Name=input( "Enter the Student name: ")
Age=int(input( "Enter the Student Age : "))
Sports_Name=input("Enter the Sports Name : ")
DOA=input("Enter the Date of Admission: ")
Fees=float(input("Enter the Fees : "))
Gender=input("Enter the Gender : ")
cursor.execute("Insert into Sports values('{}', '{}',{},'{}', '{}', {}, '{}')".format(Student_id,
Student_Name, Age, Sports_Name,DOA, Fees, Gender))
mycon.commit()
ch=input("Do you want to Insert another Record(y/n) : ").lower()
print("----------------------------------")
if ch.lower()=='n':
break
#2. Displaying Records of Table - Sports
def Select_All():
cursor. execute("select * from sports order by student_id")
data=cursor.fetchall()
print("-"*123)
print("/","Student No".ljust(10),"/","Student
name".ljust(15),"/","Age".ljust(15),"/","Sports name".ljust(15),"/","Date of
Admission".ljust(15),"/","Fees".ljust(15),"/","Gender".ljust(15),"/")
print("-"*123)
for row in data:
print("/",row[0].ljust(10),"/",row[1].ljust(15),"/",str(row[2]).ljust(15),"/",row[3].ljust(15),"/
",str(row[4]).ljust(15),"/",str(row[5]).ljust(15),"/",row[6].ljust(15),"/")
print("-"*123)
#3. Displaying Sports table details For A Range of Fees
def Range_Fees():
start=int(input("Enter the start of range: "))
end=int(input("Enter the end of range: "))
cursor.execute("select * from sports where fees between {} and {}".format(start,end))
data = cursor.fetchall()
print("/","Student No".ljust(10),"/","Student
name".ljust(15),"/","Age".ljust(15),"/","Sports name".ljust(15),"/","Date of
Admission".ljust(15),"/","Fees".ljust(15),"/","Gender".ljust(15),"/")
print("-"*123)
for row in data:
print("/",row[0].ljust(10),"/",row[1].ljust(15),"/",str(row[2]).ljust(15),"/",
row[3].ljust(15),"/",str(row[4]).ljust(15),"/",str(row[5]).ljust(15),"/",row[6].ljust(15),"/")
print("-"*123)
#4. Display Records based on Sports Names
def Select_Dname():
dname=input("Enter the Sports_Name Name : ")
cursor.execute( "Select * from Sports where Sports_Name='{}'".format(dname))
data=cursor.fetchall()
print("-"*123)
print("/", "STUDENT No".ljust(10),"/", "STUDENT NAME". ljust(15),"/",
"AGE".ljust(15),"/", "SPORTS_NAME".ljust(15),"/","date of admission".ljust(15),"/",
"FEES" .ljust(15),"/", "GENDER".ljust(15),"/")
print("-"*123)
for row in data:
print("/",row[0].ljust(10),"/",row[1].ljust(15),"/",str(row[2]).ljust(15),"/",
row[3].ljust(15),"/",str(row[4]).ljust(15),"/",str(row[5]).ljust(15),"/",(row[6]).ljust(15),"/")
print("-"*123)
#5.Display Student name, Age,Sports Name,Fees in the ascending Order of Fees
def Select_orderFees():
cursor.execute("select student_name, age, sports_name, fees from sports order by
fees")
data = cursor.fetchall()
print("-"*123)
print("/","Student
name".ljust(15),"/","Age".ljust(15),"/","Sports_Name".ljust(15),"/","Fees".ljust(15))
print("-"*123)
for row in data:
print("/",row[0].ljust(15),"/",str(row[1]).ljust(15),"/",row[2].ljust(15),"/",str(row[3]).ljust(1
5))
print("-"*123)
#6. Display Records based on Sports_Names or Age more than the entered Age
def Select_Record():
Sports_Name= input("Enter sports name: ")
Age=int(input("Enter age: "))
cursor.execute("select * from sports where sports_name = '{}' or age >=
{}".format(Sports_Name, Age))
data = cursor.fetchall()
print("-"*123)
print("/","Student
name".ljust(15),"/","Age".ljust(15),"/","Sports_Name".ljust(15),"/","Fees".ljust(15))
print("-"*123)
for row in data:
print("/",row[0].ljust(10),"/",row[1].ljust(15),"/",str(row[2]).ljust(15),"/",
row[3].ljust(15),"/",str(row[4]).ljust(15),"/",str(row[5]).ljust(15),"/",row[6].ljust(15),
"/")
print("-"*123)
#7.Display Name and Date of Admission of female Students in the descending Order of
Date of Admission
def order_dateSports():
cursor. execute("Select student_name, doa from sports where gender = 'Female'
order by doa desc")
data = cursor. fetchall()
print("-"*123)
print("/","student name".ljust(15),"/","Date of Admission".ljust(15),"/")
print("-"*123)
for row in data:
print("/",row[0].ljust(15), "/",str(row[1]).ljust(15),"/")
print("-"*123)
#8. Modify the records based on Student number:
def modify():
while True:
Student_id=input("Enter student no: ")
Student_Name=input("Enter student name: ")
Age=int(input("Enter student age: "))
Sports_Name=input("Enter Sports name: ")
DOA= input("Enter date of admission: ")
Fees= float(input("Enter student Fees: "))
Gender= input("Enter student Gender: ")
cursor.execute("update sports set student_name='{}', age={},sports_name='{}',doa
= '{}', Fees='{}',Gender='{}' where student_id='{}' ".format(Student_Name,Age,
Sports_Name,DOA,Fees,Gender, Student_id))
mycon.commit()
ch= input("Do you want to modify another record:").upper()
if ch== "N":
break
#9. Modify Fees based on Sports Name
def modify_Fees():
while True:
sports_name= input("Enter sport name :")
Fees= float(input("Enter fees: "))
cursor. execute("update sports set fees = {} where sports_name='{}'".format(Fees,
sports_name))
mycon.commit()
ch= input("Do you want to modify another record:")
if ch.upper()=="n" or "N":
break
#10. Display Name and Age of Students who belongs to Cricket,Badminton and
Football Sports
def Select_sportsname ():
cursor.execute("SELECT student_name, age FROM sports WHERE sports_name IN
('cricket', 'badminton', 'football')")
data=cursor.fetchall()
print("-"*53)
print("/","student_name".ljust(23),"/","Age".ljust(23),"/")
print("-"*53)
for row in data:
print("/",row[0].ljust(23),"/",str(row[1]).ljust(23),"/")
#11. Display Student Name ,Sports_ Name name and Date of Admission in the
descending order o Admission
def doa_descorder():
cursor.execute( "Select Student_Name, Sports_Name , DOA from Sports order by
DOA desc ")
data=cursor.fetchall()
print("-"*80)
print("/", "STUDENT NAME". ljust(23),"/", "SPORTS_NAME".ljust(23),"/", "DATE OF
ADMISSION" .ljust(23),"/")
print("-"*80)
for row in data:
print("/",row[0].ljust(23), "/",row[1].ljust(23), "/",str(row[2]).ljust(23),"/")
print("-"*80)
#12. Display different Sports_Name names
def distinct_dname():
cursor.execute( "Select Distinct Sports_Name from Sports ")
data=cursor.fetchall()
print("------------")
print("/", "Sports_Name Name".ljust(15),"/")
print("-------------")
for row in data:
print("/",row[0].ljust(15),"/")
#13. Delete Record of table- Sports
def Delete_Rec():
while True:
Student_id=input("Enter the Student number to be Deleted : ")
cursor.execute("Delete from Sports where Student_id='{}'" .format(Student_id) )
mycon.commit( )
ch=input("Do you want to Delete another Record (y/n) : ")
print("--------------------------")
if ch.upper()=='N':
break
#14. Quit Program
def Clean_Up():
mycon.close()
#Main program
ch=0
while True:
print("-"*123)
print("\t WELCOME TO ONLINE SPORTS MANAGEMENT PORTAL OF STUDENTS")
print("-"*123)
print("\t1. Insert a Record")
print("\t2. Display ALL the Records")
print("\t3. Display Sports table details For A Range of Fees")
print("\t4. Display Records based on Sports Name ")
print("\t5. Display Student name, Age,Sports_Name,Fees in the ascending Order of
Fees")
print("\t6. Display Records based on Sports Names or Age more than the entered Age
")
print("\t7. Display Name and Date of Admission of female Students in the descending
Order of Date of Admission ")
print("\t8. Modify the records based on Student number")
print("\t9. Modify Fees based on Sports Name ")
print("\t10. Display Name and Age of Students who belongs to Cricket,Badminton and
Football Sports ")
print("\t11. Display Student Name ,Sports Name name and Date of Admission in the
descending order of their Date of Admission")
print("\t12. Display different Sports Name names ")
print("\t13. Delete Record of table- Sports")
print("\t14. Quit")
print("-"*123)
ch=int(input("Enter your choice : "))
print("\n")
if ch==1:
print("\t1. Insert a Record")
print("\t ------------ \n ")
Insert_Rec()
elif ch==2:
print("\t2. Display Records")
print("\t ------------ \n ")
Select_All()
elif ch==3:
print("\t3. Displaying Sports table details For A Range of Fees")
print("\t ------------ \n ")
Range_Fees()
elif ch==4:
print("\t4. Displaying Records based on Sports_Name ")
print("\t ------------ \n ")
Select_Dname()
elif ch==5:
print("\t5. Display Student name, Age,Sports_Name,Fees in the ascending Order of
Fees")
print("\t ------------ \n ")
Select_orderFees()
elif ch==6:
print("\t6. Display Records based on Sports_Names or Age more than the entered
Age ")
print("\t ------------ \n ")
Select_Record()
elif ch==7:
print("\t7. Display Name and Date of Admission of female Students in the
descending Order of Date of Admission ")
print("\t ------------ \n ")
order_dateSports()
elif ch==8:
print("\t 8. Modify the records based on Student number")
print("\t ------------ \n ")
modify()
elif ch==9:
print("\t9. Modify Fees based on Sports Name ")
print("\t ------------ \n ")
modify_Fees()
elif ch==10:
print("\t10. Display Name and Age of Students who belongs to Cricket,Badminton
and Football Sports ")
print("\t ------------ \n ")
Select_sportsname()
elif ch==11:
print("\t11. Display Student Name ,Sports Name name and Date of Admission in the
descending order of their Date of Admission")
print("\t ------------ \n ")
doa_descorder()
elif ch==12:
print("\t12. Display different Sports names ")
print("\t ------------ \n ")
distinct_dname()
elif ch == 13:
print("\t13. Delete Records ")
print("\t ------------ \n ")
Delete_Rec()
elif ch == 14:
print("\t ----- End of program\n Thank you. Have a nice day!!! -------- ")
Clean_Up()
break
else:
print("Invalid choice")
Program:
OUTPUT
Structure of the table:
Table: Stock
1) Inserting records:
2)Displaying records:
3)Displaying sports details for a range of fees:
4)Displaying records based on sports name:
5)Display student name, age, sports name, fees in
ascending order of fees:
6) Display records based on sports name or age more
than the entered age:
7) Display name and date of admission of female
students in the descending order of Date of admission:
8) Modifying records based on student number:
9) Modifying fees based on sports name:
10) Display name and age of students who belong to
cricket, badminton and football sports:
11) Display student name, sports name and date of admission
in the desc:
12) Displaying different sports name:
13) Deleting records:
14) Exiting:
CONCLUSION
The project has been an enriching journey, deepening my understanding
of Python and its associated libraries. Exploring the intricacies of my
project and delving into programming details has expanded my
knowledge base.
In the initial stages, we encountered minor errors and confusion during
project development. However, under the guidance and assistance of
Vijayalakshmi Ma’am, these challenges were successfully navigated,
leading to the completion of the project. Her mentorship played a
pivotal role in resolving issues and ensuring smooth progression.
This experience has not only honed my technical skills but also
highlighted the importance of mentorship in overcoming obstacles. I
am grateful for the opportunity to learn, collaborate, and successfully
conclude this project.
BIBLIOGRAPHY
[Books referred for developing this application]
✓ Computer Science for class XII by Sumit Arora.
✓ Computer Science for class XII by Preethi Arora
✓ Computer Science – NCRT reader