daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. reg_dict = {}
  2. contact_numbers_list = {}
  3.  
  4. def online_ticketing():
  5.     name = str(input("Enter your name: "))
  6.     num = int(input("Enter your contact number: "))
  7.     reg_num = str(input("Enter your vehicle registration number: "))
  8.     reg_dict[reg_num] = name
  9.     contact_numbers_list[reg_num] = num
  10.     print("Thankyou, Your reservation has been made. Make sure to be on time.")
  11.  
  12. def cancellation():
  13.     n = 1
  14.     reg_num = str(input("Enter your registration number: "))
  15.     if reg_num in reg_dict:
  16.         reg_dict.pop(reg_num)
  17.         print("Sorry to see you leaving, We hope to see you back soon.")
  18.     else:
  19.         print("The registration number you entered is not found in our records. Please try again.")
  20.         while n != 3:
  21.             reg_num = str(input("Enter your registration number: "))
  22.             if reg_num in reg_dict:
  23.                 reg_dict.pop(reg_num)
  24.                 print("\nYou have successfully de-registered your vehicle. Sorry to see you leaving, We hope to see you back soon.")
  25.             else:
  26.                 print("The registration number you entered is not found in our records. Please try again.")
  27.             n+=1
  28.         if n == 3:
  29.             print("\nYou have breached the maximum attempts allowed. Please re-try by opening the portal again. Sorry for the inconvenience.")
  30.  
  31. print("Welcome to the automated Parking System\n")
  32. redirection = int(input("Press 1 for Online ticketing\nPress 2 for cancelling your reservation\n\n"))
  33. if redirection == 1:
  34.    print("You have selected online reservation. Please make sure to complete all the fields below.")
  35.    online_ticketing()
  36. elif redirection == 2:
  37.    print("You have selected the cancellation of an online registration. Please the follow the following steps.")
  38.    cancellation()
  39. else:
  40.     while redirection != (1 or 2):
  41.         print("You have selected an invalid option. Please Try again")
  42.  
  43. print(reg_dict)
  44. print(contact_numbers_list)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top