Fitness Center 1 Cs Practical For Class 12
Fitness Center 1 Cs Practical For Class 12
DELHI – 110092
SESSION 2022-23
COMPUTER PROJECT ON
FITNESS CENTER
CERTIFICATE
This is to certify that Cadet PRIYANSHU SINGH CBSE Roll No: 14663219
has successfully completed the project Work entitled Fitness Centre in the subject
Computer Science (083) laid down in the regulations of CBSE for the purpose of
Delhi -92
(Mr.Akant Sharma)
PGT Comp Science
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on
the encouragement and guidelines of many others. I take this opportunity to express
my gratitude to the people who have been instrumental in the successful completion
of this project.
I express my heartfelt gratitude to my parents for constant encouragement
while carrying out this project.
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital for the success
of the project. I am grateful for their constant support and help.
CONTENTS
1) Introduction
2) System Requirements
3) Source code
4) Output
5) Bibliography
INTRODUCTION
Introduction To Python : 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.
As we know that every fitness center has to maintain a data to keep its records.This
program can help a fitness center to maintain a record in which one can save their
customer details with their information that is needed. Also you can keep records of
your gym equipments for better convenience. This program consists use of Mysql ,
Python. Mysql is used to save the following data of customer details and other
information while python is used to execute the all functions mentioned above.
SYSTEM REQUIREMENTS
SOURCE CODE
import mysql.connector as sql
fit=sql.connect(host='localhost',user='rpvv',password='rpvv',database='fit_proj
ect')
def login():
print('')
print('to login please enter your user id and password')
print('')
user_id=input('enter your user id')
print('')
passwd=input('enter your password')
print('')
name=input('enter your name :')
print('')
c1=fit.cursor()
c1.execute('select * from user_fitness')
data=c1.fetchall()
count=c1.rowcount
for row in data:
if (user_id in row) and (passwd in row):
print(' ')
print('SUCCESSFULLY LOGIN!!!!')
while True:
print('welcome to ',name,' fitness centre')
print(' ')
print(' ')
print('to see customer details press :1 ')
print(' ')
print(' to update customer details press :2 ')
print(' ')
print('to see items in gym press :3 ')
print('')
print('to update new items press :4 ')
print('')
c2=int(input('enter your choice :'))
if (c2==1):
c1=fit.cursor()
c1.execute('select * from customer')
data=c1.fetchall()
count=c1.rowcount
print('total customer is',count)
for row in data:
print(row)
elif (c2==2):
print('')
print('to update customer details please enter the
following details')
print('')
v_customer_id=int(input('Enter customer id (in
integer) :'))
print('')
v_customer_name=input('customer name is :')
print('')
v_customer_address=input('enter address of
customer')
print('')
v_date_of_joined=input('customer joined data')
print('')
v_amt_paid=int(input('paid amuount'))
print('')
c1=fit.cursor()
#c1.execute('create table customer(customer
varchar(100) primary key,customer_name varchar(100),customer_address
varchar(1000),joined_date varchar(100),amt_paid varchar(100))'
c1.execute("insert into customer values(%s,%s,
%s,%s,%s)",
(v_customer_id,v_customer_name,v_customer_address,v_date_of_joined,v_a
mt_paid))
fit.commit()
print('customer details succesully updated')
elif (c2==3):
#c1.execute('create table
gym_items(Exercise_Equipments varchar(50),Quantity int)')
print('FOLLOWING ITEMS ARE THERE
IN',name ,'GYM')
c1=fit.cursor()
c1.execute('select * from gym_items')
data=c1.fetchall()
count=c1.rowcount
print('total gym item is',count)
for row in data:
print(row)
elif (c2==4):
print('to update new items enter the following
details')
v_object_id=int(input('enter the object code(in
integer)'))
v_object_name=input('enter the name of gym
items')
v_date_of_purchase=input('enter the date of
purchase')
v_repairing_date=input('enter the date of repair')
v_total_people_using=int(input('total person'))
c1=fit.cursor()
else:
print('something went wrong')
def account():
print('')
print('to create your account please enter your user id and password')
print('')
c1=fit.cursor()
#c1.execute("create table user_fitness_rahi1(user_id varchar(100) primary
key,password varchar(100),name varchar(100))")
v_user_id=int(input('choose your user id (in integer)'))
print('')
v_passwd=int(input('create your password (in integer)'))
print('')
v_name=input('your full name')
print('')
c1=fit.cursor()
c1.execute("insert into user_fitness_rahi1 values(%s,%s,%s)",
(v_user_id,v_passwd,v_name))
fit.commit()
print('account created')
while True:
print('')
print('WELCOME TO CHAD FITNESS ZONE')
print('')
print('TO LOGIN PRESS :1 ')
print('')
print('TO CREATE YOUR NEW ACCOUNT PRESS :2 ')
print('')
print('TO EXIT PRESS :3 ')
print('')
c=int(input('Enter your choices:'))
if (c==1):
login()
elif (c==2):
account()
elif (c==3):
print('visit again')
print('')
print('thank you')
else:
print('something went wrong')
OUTPUT
BIBLIOGRAPHY
Books :
Python class 12 by Sumita Arora
Python class 12 by Preeti Arora
NCERT class 11 Computer Science
NCERT class 12 Computer Science
Websites :
Python.org
Wikipedia
Youtube.com
Geeksforgeeks.com
myprogramsteach.com