0% found this document useful (0 votes)
11 views

Project Format

Uploaded by

packiya782
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Project Format

Uploaded by

packiya782
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

PM SHRI KENDRIYA VIDYALAYA

VIRUDHUNAGAR

COMPUTER SCIENCE
PROJECT REPORT
2024-2025

TOPIC : Gym management

Submitted by,
Name:M.siranjeevi
CLASS-XII ‘a’
ROLL
NO.-23
CERTIFICATE
This is to certify that M.siranjeevi (Reg. no. ) of class XII ‘B’
successfully completed the project work on Hotel Management in
python programming language during the year 2024-2025 in
partial fulfillment of computer science practical examination
conducted by SSCE.

Mrs. Beena J. stuvert Mr. S Lakshmi Narayanan


(Subject teacher) (Principal)
Pgt computer science

Signature of external examiner


ACKNOWLEDGEMENT
I would liketo express my special thanks tomy
guide teacher Mrs. Beena J Stuvert, PGT
computer science of this vidyalaya for her
valuable guidance, strong encouragement
and kind suggestion in every step towards the
completion of this project. I am also thankful to
my group members who will also help me to
complete this project.
I would also like to extend my gratitude to our
principal Mr. Lakshmi Narayanan sir for
providing me with all the facility that was
required.
ABSTRACT
INDEX

S.NO CONTENT PAGE NUMBER


1. Abstract
2. Introduction
3. Hardware and software requirement
4. About python and mysql
5. Source code
6. Output
7. Conclusion
8. Bibliography
INTRODUCTION
HARDWARE & SOFTWARE REQUIRMENTS

Hardware:-
 RAM OF 512 Mb
 Hard drive of 500Mb

Software:-
 IDLE (PYTHON 3.12) 64-bits
 MySQL 8.0
 WINDOWS 10
TECHNOLOGY USED

PYTHON

Python is an interpreted, high-level, general-purpose programming


language. Created by Guido van Rossum and first released in 1991.
Python is dynamically typed. It supports multiple programming
paradigms, including procedural,object-oriented, and functional
programming. It was mainly developed for emphasis on code
readability, and its syntax allows programmers to express concepts in
fewer lines of code.Python is a programming language that help you to
work quickly and integrate systems more efficiently.

There are two major Python versions- Python 2 and Python 3. Both are
quite different. Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics. Its high-level built in
data structures, combined with dynamic typing and dynamic binding,
make it very attractive for Rapid Application Development, as well as
for use as a scripting or glue language to connect existing components
together. Python's simple, easy to learn syntax emphasizes readability
and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program modularity
and code reuse. The Python interpreter and the extensive standard
library are available in source or binary form without charge for all
major platforms, and can be freely distributed.

MYSQL
MySQL is the world's most popular open source database. With its
proven performance, reliability and ease-of-use, MySQL has become
the leading database choice forweb-based applications, used by high
profile web properties including Facebook, Twitter, YouTube, Yahoo!
and many more.

Oracle drives MySQL innovation, delivering new capabilities to power


next generation web, cloud, mobile and embedded applications.

A database is a structured collection of data. It may be anything from a


simple shopping list to a picture gallery or the vast amounts of
information in a corporate network. To add, access, and process data
stored in a computer database, you need a database management
system such as MySQL Server. Since computers are very good at
handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other
applications.

The MySQL Database Software is a client/server system that consists


of a multithreaded SQL server that supports different back ends,
several different client programs and libraries, administrative tools, and
a wide range of application programming interfaces (APIs).
DATA TABLES
Mysql table structure:

Fees table:

Login table:
Member table:

Sno table:

Trainer table:
SOURCE CODE

import mysql.connector

print("""

_________________________________

GYM MANAGEMENT

_________________________________

""")

mydb=mysql.connector.connect(host="localhost",user="root",password="1234")

mycursor=mydb.cursor()

#creating database

mycursor.execute("create database gym")

mycursor.execute("use gym")

mycursor.execute("create table if not exists fees(silver int,gold int,platinum int)")

mycursor.execute("create table if not exists login(username varchar(25),password


varchar(25) not null)")

mycursor.execute("create table if not exists member(id int,name varchar(25),gender


varchar(20),category varchar(25),amount int)")

mycursor.execute("create table if not exists sno(id int,did int)")

mycursor.execute("create table if not exists trainer(id int,name varchar(25),age


varchar(25),gender varchar(10),salary int)")

mydb.commit()

#inserting important data

#login

mycursor.execute("select * from login")#username password

flag=0
for i in mycursor:

flag=1

if flag==0:

mycursor.execute("insert into login values('admin','1234')")

mydb.commit()

#inserting sno data

flag==0

mycursor.execute("select * from sno")

for i in mycursor:

flag=1

if flag==0:

mycursor.execute("insert into sno values(0,0)")

mydb.commit()

#inserting fees data

flag=0

mycursor.execute("select * from fees")

for i in mycursor:

flag=1

if flag==0:

mycursor.execute("insert into fees values(700,600,500)")

mydb.commit()

#main section

while True:

print("""

1.Login

2.Exit

""")
ch=int(input("enter your choice"))

if ch==1:

passs=input("enter your password")

mycursor.execute("select * from login")

for i in mycursor:

t_user,t_pas=i

if t_pas==passs:

print("""

1.Add trainer

2.Add Member

3.Remove Trainer

4.Remove Member

5.Modify

6.Change Password

7.Go Back

""")

ch=int(input("enter your choice:"))

#adding trainer

if ch==1:

name=input("Enter Name: ")

age=input("Enter Age: ")

gender=input("Enter Gender(m/f): ")

salary=int(input("Enter Salary: "))

mycursor.execute("select * from sno")

for i in mycursor:

t_id,t_did=i

t_id=t_id+1
mycursor.execute("insert into trainer values('"+str(t_id)
+"','"+name+"','"+age+"','"+gender+"','"+str(salary)+"')")

mycursor.execute("update sno set id='"+str(t_id)+"' ")

mycursor.execute("select * from trainer")

r=mycursor.fetchall()

print(r)

mydb.commit()

print(f"trainer Added with unique{t_id}")

#add member

elif ch==2:

name=input("Enter Name: ")

gender= input("Enter Gender(m/f): ")

print("""

1.Platinum------------->amount->8400 [per month 700]

2.Gold----------------->amount->7200 [per month 600]

3.Silver---------------->amount->6000 [per month 500]

""")

ch=int(input("enter your choice"))

mycursor.execute("select * from fees")

for i in mycursor:

t_platinum,t_gold,t_silver=i

if ch==1:

category='Platinum'

amount=t_platinum

elif ch==2:

category='Gold'

amount=t_gold
elif ch==3:

category='Silver'

amount=t_silver

mycursor.execute("select * from sno")

for i in mycursor:

t_id,t_did=i

t_did=t_did+1

mycursor.execute("insert into member values('"+str(t_did)


+"','"+name+"','"+gender+"','"+category+"','"+str(amount)+"')")

mycursor.execute("update sno set did='"+str(t_did)+"' ")

mycursor.execute("select * from member")

m=mycursor.fetchall()

print(m)

mydb.commit()

print(f"Member added succesfully with unique id {t_did}")

#remove trainer

elif ch==3:

idd=int(input("Enter id to remove"))

mycursor.execute("select * from trainer")

flag=0

for i in mycursor: #(a,b,c,d)

t_id=i[0]

if t_id==idd:

flag=1

if flag==1:

mycursor.execute("delete from trainer where id='"+str(idd)+"'")

mydb.commit()
print("succesfully removed.....")

else:

print("ID Not Found....")

#remove member

elif ch==4:

idd=int(input("Enter ID to remove"))

mycursor.execute("select * from member")

flag=0

for i in mycursor:

t_id=i[0]

if t_id==idd:

flag=1

if flag==1:

mycursor.execute("delete from member where id ='"+str(idd)+"' ")

mydb.commit()

print("Removed succesfully...")

else:

print("ID not found.....")

#modify

elif ch==5:

loop1='y'

while loop1=='y':

print("""

1.Plans

2.Trainer Info

3.Member Info

4.Go Back
""")

ch=int(input("Enter your choice: "))

if ch==1:

print("""

1.Platinum

2.Gold

3.Silver

""")

#modify plans

ch2=int(input("Enter your choice"))

amount=int(input("Enter amount per month to update: "))

if ch2==1:

mycursor.execute("update fees set Platinum='"+str(amount)+"' ")

mydb.commit()

if ch2==2:

mycursor.execute("update fees set Gold='"+str(amount)+"' ")

mydb.commit()

if ch2==3:

mycursor.execute("update fees set Silver='"+str(amount)+"' ")

mydb.commit()

#Trainer info

elif ch==2:

idd=int(input("Enter id to modify"))

mycursor.execute("select* from trainer")

flag=0

for i in mycursor:
t_id=i[0]

if t_id==idd:

flag=1

if flag==1:

print("""

1.Name

2.Age

3.Gender

4.Salary

""")

ch=int(input("enter your choice"))

if ch==1:

name=input("enter updated name: ")

mycursor.execute("update trainer set name='"+name+"' where id='"


+str(idd)+"' ")

mydb.commit()

print("successfully done....")

elif ch==2:

age=input("enter updated age")

mycursor.execute("update trainer set age'"++"' where id='"+str(idd)


+"' ")

mydb.commit()

print("successfully done....")

elif ch==3:

gender=input("enter updated gender(m/f): ")

mycursor.execute("update trainer set gender='"+gender+"' where


id='" +str(idd)+"' ")

mydb.commit()
print("successfully done....")

elif ch==4:

salary=int(input("enter update salary: "))

mycursor.execute("update trainer set salary='"+str(salary)+"' where


id='" +str(idd)+"' ")

mydb.commit()

print("successfully done....")

#member info

elif ch==3:

idd=int(input("enter id to modify: "))

mycursor.execute("select * from member")

flag=0

for i in mycursor:

t_id=i[0]

if t_id==idd:

flag=1

if flag==1:

print("""

1.Name

2.Gender

3.Category

""")

ch2=int(input("enter your choice: "))

if ch2==1:

name=input("enter update name: ")

mycursor.execute("update member set name='"+name+"' where


id='"+str(idd)+"' ")
mydb.commit()

elif ch2==2:

gender=input("enter updated gender(m/f): ")

mycursor.execute("update member set gender='"+gender+"'where


id='"+str(idd)+"' ")

mydb.commit()

elif ch3==3:

print("""

1.Platinum

2.Gold

3.Silver

""")

mycursor.execute("select * from fees")

for i in mycursor:

t_platinum,t_gold,t_silver=i

ch3=int(input("enter your choice"))

if ch3==1:

category="platinum"

amount=t_platinum

elif ch3==2:

category="gold"

amount=t_gold

elif ch3==3:

category="silver"

amount=t_silver

mycursor.execute("update member set category'"+category+'",


amount="'+str(amount)+"'where id='"+str(idd)+"' ")
mydb.commit()

else:

print("ID not Found")

elif ch==4:

break

#change password

elif ch==6:

passs=input("enter old password: ")

mycursor.execute("select * from login ")

for i in mycursor:

t_user,t_pas=i

if t_pas==passs:

new_pas=input("enter new password: ")

mycursor.execute("update login set password='"+new_pas+"' ")

mydb.commit()

print("password changed succesfully...")

else:

print("wrong password")

elif ch==7:

break

else:

print("wrong password entered")

if ch==2:

print("exited successfully")

break
CONCLUSION

While Developing this project, Hotel Management teaches us how we


can manage a hotel , restaurant , etc. Hotel Management system is an
easy Script that is created in Python Programme , also while visualising
this data we are able to analyse the data of Hotel Management system.
This Script has 5 modules-
The first one is the main module, Which is used to control all other
modules .
Second one is the “Customer Information” module which displayes the
data or the information of the customer.
Third one is the “Food Purchased” module which displayes the list of
food items that was ordered by the customer.
Fourth one is the “Room Rent” module which displayes the type of
room is to rent by the customer .
Fifth and the last one is the “Hotel Bill” module which is this module
displayed the total purchased of the customer.
BIBLIOGRAPHY
 Computer science with PYTHON textbook for class XI
and XII by SUMITA ARORA.
 https//www.wikipedia.org
 https//www.projectworlds.in
 https//www.geeksforgeeks.org

You might also like