Project Format
Project Format
VIRUDHUNAGAR
COMPUTER SCIENCE
PROJECT REPORT
2024-2025
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.
Hardware:-
RAM OF 512 Mb
Hard drive of 500Mb
Software:-
IDLE (PYTHON 3.12) 64-bits
MySQL 8.0
WINDOWS 10
TECHNOLOGY USED
PYTHON
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.
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("use gym")
mydb.commit()
#login
flag=0
for i in mycursor:
flag=1
if flag==0:
mydb.commit()
flag==0
for i in mycursor:
flag=1
if flag==0:
mydb.commit()
flag=0
for i in mycursor:
flag=1
if flag==0:
mydb.commit()
#main section
while True:
print("""
1.Login
2.Exit
""")
ch=int(input("enter your choice"))
if ch==1:
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
""")
#adding trainer
if ch==1:
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)+"')")
r=mycursor.fetchall()
print(r)
mydb.commit()
#add member
elif ch==2:
print("""
""")
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
for i in mycursor:
t_id,t_did=i
t_did=t_did+1
m=mycursor.fetchall()
print(m)
mydb.commit()
#remove trainer
elif ch==3:
idd=int(input("Enter id to remove"))
flag=0
t_id=i[0]
if t_id==idd:
flag=1
if flag==1:
mydb.commit()
print("succesfully removed.....")
else:
#remove member
elif ch==4:
idd=int(input("Enter ID to remove"))
flag=0
for i in mycursor:
t_id=i[0]
if t_id==idd:
flag=1
if flag==1:
mydb.commit()
print("Removed succesfully...")
else:
#modify
elif ch==5:
loop1='y'
while loop1=='y':
print("""
1.Plans
2.Trainer Info
3.Member Info
4.Go Back
""")
if ch==1:
print("""
1.Platinum
2.Gold
3.Silver
""")
#modify plans
if ch2==1:
mydb.commit()
if ch2==2:
mydb.commit()
if ch2==3:
mydb.commit()
#Trainer info
elif ch==2:
idd=int(input("Enter id to modify"))
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
""")
if ch==1:
mydb.commit()
print("successfully done....")
elif ch==2:
mydb.commit()
print("successfully done....")
elif ch==3:
mydb.commit()
print("successfully done....")
elif ch==4:
mydb.commit()
print("successfully done....")
#member info
elif ch==3:
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
""")
if ch2==1:
elif ch2==2:
mydb.commit()
elif ch3==3:
print("""
1.Platinum
2.Gold
3.Silver
""")
for i in mycursor:
t_platinum,t_gold,t_silver=i
if ch3==1:
category="platinum"
amount=t_platinum
elif ch3==2:
category="gold"
amount=t_gold
elif ch3==3:
category="silver"
amount=t_silver
else:
elif ch==4:
break
#change password
elif ch==6:
for i in mycursor:
t_user,t_pas=i
if t_pas==passs:
mydb.commit()
else:
print("wrong password")
elif ch==7:
break
else:
if ch==2:
print("exited successfully")
break
CONCLUSION