0% found this document useful (0 votes)
13 views26 pages

Dev Ansh

The document outlines a project titled 'Sports Club' completed by Devansh Arora for a Computer Science course. It includes a lab certificate, acknowledgment, project description, software requirements, functions and methods, coding details, and a bibliography. The project is designed to manage sports club activities, allowing for member registration, viewing, searching, and removal using Python and MySQL.

Uploaded by

whiteparrot71x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views26 pages

Dev Ansh

The document outlines a project titled 'Sports Club' completed by Devansh Arora for a Computer Science course. It includes a lab certificate, acknowledgment, project description, software requirements, functions and methods, coding details, and a bibliography. The project is designed to manage sports club activities, allowing for member registration, viewing, searching, and removal using Python and MySQL.

Uploaded by

whiteparrot71x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

PROJECT

SPORTS CLUB

Name : DEVANSH ARORA


Class : XII
Subject : Computer Science
(083)
School : The Lucknow Public
Collegiate
Session : 2025-26

Table of contents
 Lab Certificate
 Acknowledgement
 Working description of the
project
 Software requirement
 Functions& methods and their
objectives
 Code
 Output
 Bibliography
LAB CERTIFICATE

This is to certify that Devansh Arora of class 12th


has completed this project titled “Sports Club”
under my guidance and this project may be
considered as the part of the Practical exam of
AISSCE conducted by CBSE.

Subject teacher:
Mrs. Santwana Srivastava
External Examiner:
_______________________
ACKNOWLEDGEMENT

I would like to express my deep sense of thanks and gratitude to my teacher


Mrs. Santwana Srivastava for guiding me immensely through the course of
project. Her constructive advice and constant motivation is responsible for
the successful completion of this project.

I also thank to my parents for their motivation and support. I must thanks to
my classmates for their timely help and support for completion of this
project.

-DEVANSH ARORA
DESCRIPTION OF THE PROJECT

This project is designed for keeping the records of the hostel activities. It is
created to manage different operations related to the sports club.
The project consists of four options that are as follows:

1. To register club
2. To view club
3. To search club
4. To remove club
Software Requirement

Language : Python
(front end)

DBMS : MySQL
(back end)
Functions & methods and their objectives
1.built-in Functions & methods

format() : formats the given string into a nicer output in Python


input() : Reads a line entered on a console by an input device
and convert it into a string and returns it.
int() : int() converts the specified value in to integer
number.
print() : Prints the specified message to the screen.

append() : The append( ) method appends an element to the end

of the list.

commit() : commit() method sends a commit statement to the


MySQL server, committing the current transaction.
2. UDF Functions

RegisterClub() : for registration of new member.

clubview() : for viewing details of members.

Searchclub() : for viewing details of members on the basis of their


enroll.
Removeclub () : to delete a record of a member.

Menuset() : to display the menu.


CODING

DBMS: MySQL
Host : localhost
User: root
Password: admin
DataBase : sports

Table creation : As given below


create table club
(
Enroll int(6),
Sname char(10),
Age int(5),
City varchar(12),
Class char(6),
Phone int(12),
Address varchar(16),
Regfee int(6)
);

Table Structure: club


PYTHON CODE
import os
import platform
import mysql.connector

mydb=mysql.connector.connect(host="localhost", user="root",passwd="admin",
database="sports")

mycursor=mydb.cursor()
def RegisterClub():
L=[]
enroll=int(input("Enter the registration number(Max 5 Digits) : "))
L.append(enroll)
sname=input("Enter the Name of club member: ")
L.append(sname)
age=int(input("Enter Age of member : "))
L.append(age)
city=input("Enter the City of the member : ")
L.append(city)
sportname=input("Enter the sport name : ")
L.append(sportname)
phone=input("Enter Phone number in Digits : ")
L.append(phone)
address=input("Enter Address of member : ")
L.append(address)
regfee=int(input("Enter the registration Fee : "))
L.append(regfee)
value=L
sql="insert into club (enroll,sname,age,city,class,phone,address,regfee)
values (%s,%s,%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,value)
mydb.commit()

def ClubView():
print("Select the search criteria : ")
print("1. Enroll")
print("2. Name")
print("3. Age")
print("4. City")
print("5. phone")
print("6. Address")
print("7. All")
ch=int(input("Enter the choice : "))
if ch==1:
s=int(input("Enter enroll no : "))
rl=(s,)
sql="select * from club where enroll=%s"
mycursor.execute(sql,rl)
elif ch==2:
s=input("Enter Name : ")
rl=(s,)
sql="select * from club where sname=%s"
mycursor.execute(sql,rl)
elif ch==3:
s=int(input("Enter age : "))
rl=(s,)
sql="select * from club where age=%s"
mycursor.execute(sql,rl)
elif ch==4:
s=input("Enter City : ")
rl=(s,)
sql="select * from club where City=%s"
mycursor.execute(sql,rl)
elif ch==5:
s=input("Enter phone : ")
rl=(s,)
sql="select * from club where phone=%s"
mycursor.execute(sql,rl)
elif ch==6:
s=input("Enter address : ")
rl=(s,)
sql="select * from club where address=%s"
mycursor.execute(sql,rl)
elif ch==7:
sql="select * from club"
mycursor.execute(sql)
res=mycursor.fetchall()
print("The Memebers details are as follows : ")
print("(ROll, Name, Age, Class, City)")
for x in res:
print(x)

def SearchClub():
print("Please enter the details to view the fee details :")
enroll=int(input("Enter the enroll number of the member whose fee is to
be viewed : "))
sql="Select * from club where enroll=%s"
rl=(enroll,)
mycursor.execute(sql,rl)
res=mycursor.fetchall()
if res==None:
print("Record not Found . . . ")
return
print("The details of the memebrs are : " )
for x in res:
print(x)

def RemoveClub():
enroll = int(input("Enter the enroll number of the memeber to be
deleted : "))
rl=(enroll,)
sql="Delete from club where enroll=%s"
mycursor.execute(sql,rl)
mydb.commit()

def MenuSet(): #Function For The Member Management System


print("Enter 1 : To Register Club")
print("Enter 2 : To View Club ")
print("Enter 3 : To Search Club ")
print("Enter 4 : To Remove Club")
try:
userInput = int(input("Please Select An Above Option: "))
#Will Take Input From User
except ValueError:
print("\nHy! That's Not A Number") #Error Message
print("\n") #Print New Line
if(userInput == 1):
RegisterClub()
elif (userInput==2):
ClubView()
elif (userInput==3):
SearchClub()
elif (userInput==4):
RemoveClub()
else:
print("Enter correct choice. . . ")

def runAgain():
runAgn = input("\nwant To Run Again Y/n: ")
while(runAgn.lower() == 'y'):
if runAgn.lower()=='n':
print(os.system('cls'))
else:
print(os.system('clear'))"""
MenuSet()
break

MenuSet()
runAgain()
Output

Output 1:-
Output 2:-

Output 3:-
Output 4:-

Output 5:-
Output 6:-

Output 7:-
Output 8:-

Output 9:-
Output 10:-
Output 11:-

BIBLIOGRAPHY
BOOKS
Computer Science With Python -
A Text Book For Class XII By Preeti Arora

You might also like