Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reg_dict = {}
- contact_numbers_list = {}
- def online_ticketing():
- name = str(input("Enter your name: "))
- num = int(input("Enter your contact number: "))
- reg_num = str(input("Enter your vehicle registration number: "))
- reg_dict[reg_num] = name
- contact_numbers_list[reg_num] = num
- print("Thankyou, Your reservation has been made. Make sure to be on time.")
- def cancellation():
- n = 1
- reg_num = str(input("Enter your registration number: "))
- if reg_num in reg_dict:
- reg_dict.pop(reg_num)
- print("Sorry to see you leaving, We hope to see you back soon.")
- else:
- print("The registration number you entered is not found in our records. Please try again.")
- while n != 3:
- reg_num = str(input("Enter your registration number: "))
- if reg_num in reg_dict:
- reg_dict.pop(reg_num)
- print("\nYou have successfully de-registered your vehicle. Sorry to see you leaving, We hope to see you back soon.")
- else:
- print("The registration number you entered is not found in our records. Please try again.")
- n+=1
- if n == 3:
- print("\nYou have breached the maximum attempts allowed. Please re-try by opening the portal again. Sorry for the inconvenience.")
- print("Welcome to the automated Parking System\n")
- redirection = int(input("Press 1 for Online ticketing\nPress 2 for cancelling your reservation\n\n"))
- if redirection == 1:
- print("You have selected online reservation. Please make sure to complete all the fields below.")
- online_ticketing()
- elif redirection == 2:
- print("You have selected the cancellation of an online registration. Please the follow the following steps.")
- cancellation()
- else:
- while redirection != (1 or 2):
- print("You have selected an invalid option. Please Try again")
- print(reg_dict)
- print(contact_numbers_list)
Add Comment
Please, Sign In to add comment