Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- database = []
- import sys
- print()
- print("Holiday Packages Database")
- print('Packages Loaded:', len(database))
- print("+-+-+-+-+-+-+-+-+-+-+-+-+")
- print("Available Options")
- print("a. Enter a new holiday package")
- print("b. Display Inventory (all destinations)")
- print('c. Search for a package (view details)')
- print('d. Delete a holiday package')
- print('e. Show all holiday packages with seasonal discount')
- print('f. Show all holiday packages with no discount')
- print('q. Quit')
- print('Choose an option (a to f) or q to Quit ')
- print()
- menu = input("Enter a option from list above:")
- #option a (Enter a new holiday package)
- if menu == ('a'):
- ID = int(input("Enter the ID: "))
- city = input("Enter the Holiday destination city")
- country = input('Enter the Destination country')
- catering = int(input('Enter the amount of people to cater for'))
- night = int(input('Enter the number of nights you plan to stay'))
- price = int(input('Enter the price per person per night'))
- discount = input('Available or not available')
- database.append(ID, city, country, catering, night, price, discount)
- #option b (Display inventory)
- if menu == ('b'):
- for packages in range(0,len(database)):
- print(database[packages])
- if menu != ("q"):
- print()
- print("Holiday Packages Database")
- print('Packages Loaded:', len(database))
- print("+-+-+-+-+-+-+-+-+-+-+-+-+")
- print("Available Options")
- print("a. Enter a new holiday package")
- print("b. Display Inventory (all destinations)")
- print('c. Search for a package (view details)')
- print('d. Delete a holiday package')
- print('e. Show all holiday packages with seasonal discount')
- print('f. Show all holiday packages with no discount')
- print('q. Quit')
- print('Choose an option (a to f) or q to Quit ')
- print()
- menu = input("Enter a option from list above:")
Add Comment
Please, Sign In to add comment