0% found this document useful (0 votes)
142 views8 pages

Parking Management System Ip Project 2023

This document describes a parking management system project that manages vehicle data in a dataframe. It allows users to park and retrieve vehicles, view pricing information and the list of parked vehicles. The key functions include adding a new parked vehicle to the dataframe with owner name, vehicle number, type, hours parked, spot, bill amount. Vehicles can be removed from the dataframe once retrieved. Available parking spots are tracked for different vehicle types.
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)
142 views8 pages

Parking Management System Ip Project 2023

This document describes a parking management system project that manages vehicle data in a dataframe. It allows users to park and retrieve vehicles, view pricing information and the list of parked vehicles. The key functions include adding a new parked vehicle to the dataframe with owner name, vehicle number, type, hours parked, spot, bill amount. Vehicles can be removed from the dataframe once retrieved. Available parking spots are tracked for different vehicle types.
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/ 8

#####################################PARKING MANAGEMENT SYSTEM IP PROJECT

2023######################

#############################importing required libraries###########################

import pandas as pd

import numpy as np

###########################Dictionary for parked vehicle########

vehicle_list = {'Owner\'s name' : ['Dharmesh patel' , 'dipak sharma' , 'jethalal gada','ghanshyam


chauhan'],

'vehicle number' : ['GJ 16 CG 5683' , ' MH 23 AB 7438' , 'GJ 05 EF 9232','Gj 03 JI 9898'],

'Vehicle type' : ['car' , 'scooter' , 'car' , 'bike'],

'hours' : [5 ,3,10,2],

'parking spot' : ['c6' , 's7' , 'c2','b1'],

'offer claimed' : ['no' , 'no' , 'yes','yes'],

'bill' : [275,115,525,75]}

####################creating the DataFrame#############

parked_vehicles = pd.DataFrame(vehicle_list)

parked_vehicles.index = np.arange(1, len(parked_vehicles) + 1)

pd.set_option('display.max_colwidth', 15)

#########parking spot####

available_spot_car = ['c1' , 'c3' , 'c4' ,'c5' , 'c6' , 'c7' ,'c8' , 'c9' ,'c10']

available_spot_bike = ['b2' , 'b3','b4','b5','b6','b7','b8','b9','b10']

available_spot_scooter=['s1','s2','s3','s4','s5','s6','s8','s9','s10']

while True:
#############################giving
options#########################################

print(" welcome to (name) pay and use parking ")

print(" +---------------------------------------------------+ ")

print(" | please make your choice | ")

print(" +---------------------------------------------------+ ")

print(" |1. park your vehicle | ")

print(" |2. Take your vehicle from parking | ")

print(" |3. Pricing information | ")

print(" |4. Get the list of vehicles parked | ")

print(" |5. exit | ")

print(" +---------------------------------------------------+ ")

ch = int(input(" ------> "))

if ch == 1:

o_name,v_num,v_type,v_spot,bill_amt,o_claim = "","","","","",""

while True: #for type of vehicle

print(" +-------------------------------+")

print(" |please select your vehicle type|")

print(" +-------------------------------+")

print(" |\"1\" for car |")

print(" |\"2\" for bike |")

print(" |\"3\" for scooter |")

print(" +-------------------------------+")

v_type = int(input('make your choice here ->>'))

if v_type == 1:

if len(available_spot_car) != 0: # check if spot for car is available


v_type = "car"

break

else:

print("Sorry! currently no spot available for car")

break

break

elif v_type == 2:

if len(available_spot_bike) != 0: #check for bike

v_type = "bike"

break

else:

print("Sorry! currently no spot available for bike")

break

break

elif v_type == 3:

if len(available_spot_scooter) != 0: # check for scooter

v_type = "scooter"

break

else:

print("Sorry! currently no spot available for scoter")

break

break

else : print("ERROR : PLEASE MAKE A VALID CHOICE")

while True: #for owner's name


o_name = input("please enter the vehicle owner's name")

if (o_name.replace(" ","")).isalpha():

break

else:print("ERROR:PLEASE ENTER A VALID NAME")

while True: #for vehicle number

v_num = (input('Please enter the vehicle number , format eg: GJ 16 EG 8989 ---->')).upper()

if len(v_num) == 13 and v_num not in parked_vehicles['vehicle number'].values:

break

else:print("ERROR Either vehicle already exists or INVALID VEHICLE NUMBER")

while True: #for number of hours

bill_amt = 0

v_hrs = input("please specify the number of hours you want to park your vehicle")

if v_hrs.isalpha():

print("ERROR : PLEASE ENTER VALID DETAILS")

else:

v_hrs = int(v_hrs)+1

if v_hrs == 1:

bill_amt = 75

elif v_hrs >1 and v_type == "car":

bill_amt = 75 + 50*(v_hrs - 1)

elif v_hrs >1 and v_type == "bike":

bill_amt = 75 + 30*(v_hrs - 1)
elif v_hrs >1 and v_type == "scooter":

bill_amt = 75 + 20*(v_hrs - 1)

break

print("Do you want to avail our special offer to wash your vehicle?")

print("price: 250/- for car and 120/- for bike and scooter")

while True: # special offer for vehicle wash

o_claim = input("yes or no?")

if o_claim.lower() == "yes":

if v_type == "car":

bill_amt += 250

break

else:

bill_amt += 120

break

if o_claim.lower() == "no":

break

else:print("ERROR : INVALID CHOICE")

if v_type == "car":

v_spot = available_spot_car[0]

available_spot_car.pop(0)

if v_type == "bike":

v_spot = available_spot_bike[0]

available_spot_bike.pop(0)

if v_type == "scooter":

v_spot = available_spot_scooter[0]

available_spot_scooter.pop(0)
print(" ENTRY SUCCESSFULL")

print(" here's your bill")

print(" +--------------------------------------------------+")

print(" |owner name :", o_name," |")

print(" |vehicle number :", v_num," |")

print(" |vehicle type :",v_type," |")

print(" |parking hours :",v_hrs," |")

print(" |parking spot :",v_spot," |")

print(" |offer claimed :",o_claim," |")

print(" |bill amount :",bill_amt," |")

print(" +--------------------------------------------------+")

print(" please pay you bill amount at the counter ")

print(" please take a photograph of it for future reference....THANK YOU :)")

parked_vehicles.loc[len(parked_vehicles)+1] = [o_name, v_num, v_type, v_hrs, v_spot, o_claim,


bill_amt]

print(parked_vehicles)

if ch == 2:

v_num = (input('Please enter the vehicle number , format eg: GJ 16 EG 8989 ---->')).upper()

if v_num in parked_vehicles['vehicle number'].values:

print(parked_vehicles.iloc[((parked_vehicles.index[parked_vehicles['vehicle number'] ==
v_num])-1)[0]])

while True:

resp = input("if this information correct regarding your vehicle?").lower()

if resp == "yes":
print("THANL YOU :)..Please collect your vehicle from the parking spot mentioned in the
list")

parked_vehicles = parked_vehicles.drop(parked_vehicles[parked_vehicles['vehicle
number'] == v_num].index)

parked_vehicles.index = np.arange(1, len(parked_vehicles) + 1)

break

else:print("please try again")

else:print("NO ENTRIES FOUND")

print(parked_vehicles)

if ch == 3:

print(" here is the pricing informatio for parking the vehicles")

print(" --> 75/- for first hour for any vehicle")

print("for next consicutive hours")

print(" --> 50/- for car parking")

print(" --> 30/- for bike parking")

print(" --> 20/- for scooter parking")

print("NOTE: for fractional hours the price is calculated to the next nearest integral hour.")

print("for eg. for prking for 2.5 hours price is calculated for 3 hours")

if ch == 4:

print("here is the list of vehicles parked")

print(parked_vehicles)

if ch == 5:

break
else:print("please make a valid choice")

##################################################################################
#############################################################

# +-------- |\ | +----

# | |\ | | \

# | | \ | | \

# +------- | \ | | |

# | | \ | | /

# | | \| | /

# +-------- | \| +----

############################################MADE BY JAINIL , RISHABH AND


AKHILESH######################################################3

You might also like