Gym Management System Project In Python With Source Code
The Gym Management System Project In Python was developed using Python Programming, this Project With Source Code run in console and the project documents consist of a python manuscript (main.py, customer.py, package.py, gymmanager.py).
A Gym Management System is an easy console based project which is extremely understandable as well as make use of.
There is no login system here. Speaking about its features, it consists of all the called for features that include adding as well as watching consumer, plan records along with their settlements.
While adding records to the system, the customer needs to enter the customer’s name, contact information with joining the day
This Code For Gym Management System also includes a downloadable Gym Management System Project With Source Code for free, just find the downloadable source code below and click to start downloading.
Features:
- Add Customer, Package, Subscription.
- View Customers and Package details.
- Payment.
By the way if you are new to python programming and you don’t know what would be the the Python IDE to use, I have here a list of Best Python IDE for Windows, Linux, Mac OS that will suit for you. I also have here How to Download and Install Latest Version of Python on Windows.
To start creating a Gym Management System Project, make sure that you have installed Python in your computer.
Gym Management System Project In Python With Source Code : Steps on how to run the project
Time needed: 5 minutes
These are the steps on how to run Gym Management System Project In Python With Source Code
- Step 1: Download the given source code below.
First, download the given source code below and unzip the source code.
- Step 2: Import the project to your PyCharm IDE.
Next, import the source code you’ve download to your PyCharm IDE.
- Step 3: Run the project.
last, run the project with the command “py main.py”
Installing Libraries
from click._compat import raw_input
from GymManager import GymManager
from Customer import Customer
from Package import Package
Complete Source Code
from click._compat import raw_input
from GymManager import GymManager
from Customer import Customer
from Package import Package
gymManager = GymManager()
print ("\n")
print (" *****The Body Shop Fitness Center*****")
print ("Select the Option from Menu")
def menu():
print ("1. Add Customer")
print ("2. Add Package")
print ("3. Show all packages")
print ("4. Show all customers")
print ("5. Find customer by name")
print ("6. Add Subscription")
print ("7. Add Payment")
print ("8. Show this menu again")
print ("\nEnter You Choice: ")
menu()
while(True):
input = int(raw_input())
if input == 1:
name = str(raw_input("Enter customer's name - "))
phoneNo = str(raw_input("Enter customer's phone no. - "))
joinDate = str(raw_input("Enter joining date - "))
customer = Customer(name, phoneNo, joinDate)
gymManager.addCustomer(customer)
elif input == 2:
type = str(raw_input("Enter package type - "))
facilities = str(raw_input("Enter facilities - "))
cost = int(raw_input("Enter package cost - "))
package = Package(type, facilities, cost)
gymManager.addPackage(package)
elif input == 3:
print ("PackageID\tType\tFacilities\tCost")
for pkgId in gymManager.packages.keys():
package = gymManager.packages[pkgId]
packageId = pkgId
type = package.getType()
facilities = package.getFacilities()
cost = package.getCost()
print (str(packageId) + "\t" + type + "\t" + facilities + "\t" + str(cost))
elif input == 4:
print ("CustomerID\tName\tPhone\tJoining Date")
for cusId in gymManager.customers.keys():
customer = gymManager.customers[cusId]
customerId = cusId
name = customer.getName()
phoneNo = customer.getPhoneNo()
joinDate = customer.getJoiningDate()
print (str(customerId) + "\t" + name + "\t" + phoneNo + "\t" + joinDate)
elif input == 5:
name = str(raw_input("Enter customer name - "))
customerId = -1
for cusId in gymManager.customers.keys():
customer = gymManager.customers[cusId]
if customer.getName() == name:
print (customer)
customerId = cusId
break;
if customerId == -1:
print ("Customer with name - {0} not found").format(name)
else:
packageDict = gymManager.subscriptions.get(customerId)
print ("Customer found", gymManager.customers[customerId])
if packageDict != {}:
print ("Subscribed to"),
for pkgId in packageDict.keys():
print (gymManager.packages[pkgId], "for {0} months".format(gymManager.subscriptions[customerId][packageId]))
else:
print ("No subscription found for this customer")
elif input == 6:
name = str(raw_input("Enter customer name - "))
customerId = -1
for cusId in gymManager.customers.keys():
customer = gymManager.customers[cusId]
if customer.getName() == name:
print (customer)
customerId = cusId
break;
if customerId == -1:
print ("Customer with name - {0} not found.").format(name)
print ("Try adding a new customer.")
else:
print ("Customer found", gymManager.customers[customerId])
if gymManager.packages.keys():
for pkgId in gymManager.packages.keys():
print (pkgId, gymManager.packages[pkgId])
packageId = int(raw_input("Select a package: "))
if packageId > max(gymManager.packages.keys()):
print ("Please select a valid package.")
else:
months = int(raw_input("Enter no. of months"))
gymManager.addSubscription(gymManager.customers[customerId], gymManager.packages[packageId], months)
print ("Subscription added.")
else:
print("No package exists. Try adding a package first.")
elif input == 7:
name = str(raw_input("Enter customer name - "))
customerId = -1
for cusId in gymManager.customers.keys():
customer = gymManager.customers[cusId]
if customer.getName() == name:
print (customer)
customerId = cusId
break;
if customerId == -1:
print ("Customer with name - {0} not found.").format(name)
print ("Try adding a new customer.")
else:
print ("Customer found", gymManager.customers[customerId])
if gymManager.packages.keys():
for pkgId in gymManager.packages.keys():
print (pkgId, gymManager.packages[pkgId])
packageId = int(raw_input("Select a package"))
if packageId > max(gymManager.packages.keys()):
print ("Please select a valid package.")
else:
if gymManager.subscriptions[customerId][packageId] > 0:
customer = gymManager.customers[customerId]
package = gymManager.packages[packageId]
gymManager.addPayment(customer, package, package.getCost())
print ("Payment added. Subscription expires in {0} months.").format(gymManager.subscriptions[customerId][packageId])
elif input == 8:
menu()
elif input == 9:
gymManager.save()
exit(0)
else:
print ("Please enter a valid number")
menu()
Download Source Code below
Summary
Gym Management System project. The project documents consist of a python manuscript (main.py, customer.py, package.py, gymmanager.py).
This is an easy console based project which is extremely understandable as well as make use of.
Other Related Article
Related Articles
- Code For Game in Python: Python Game Projects With Source Code
- Best Python Projects With Source Code FREE DOWNLOAD
- How to Make a Point of Sale In Python With Source Code
- Python Code For Food Ordering System | FREE DOWNLOAD
- Inventory Management System Project in Python With Source Code
Inquiries
If you have any questions or suggestions about Gym Management System Project In Python With Source Code, please feel free to leave a comment below.