Guest User

Untitled

a guest
Dec 15th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. database = []
  2.  
  3.  
  4. import sys
  5.  
  6. print()
  7. print("Holiday Packages Database")
  8. print('Packages Loaded:', len(database))
  9. print("+-+-+-+-+-+-+-+-+-+-+-+-+")
  10. print("Available Options")
  11. print("a. Enter a new holiday package")
  12. print("b. Display Inventory (all destinations)")
  13. print('c. Search for a package (view details)')
  14. print('d. Delete a holiday package')
  15. print('e. Show all holiday packages with seasonal discount')
  16. print('f. Show all holiday packages with no discount')
  17. print('q. Quit')
  18. print('Choose an option (a to f) or q to Quit ')
  19.  
  20. print()
  21. menu = input("Enter a option from list above:")
  22.  
  23. #option a (Enter a new holiday package)
  24. if menu == ('a'):
  25. ID = int(input("Enter the ID: "))
  26. city = input("Enter the Holiday destination city")
  27. country = input('Enter the Destination country')
  28. catering = int(input('Enter the amount of people to cater for'))
  29. night = int(input('Enter the number of nights you plan to stay'))
  30. price = int(input('Enter the price per person per night'))
  31. discount = input('Available or not available')
  32. database.append(ID, city, country, catering, night, price, discount)
  33.  
  34. #option b (Display inventory)
  35. if menu == ('b'):
  36. for packages in range(0,len(database)):
  37. print(database[packages])
  38.  
  39. if menu != ("q"):
  40. print()
  41. print("Holiday Packages Database")
  42. print('Packages Loaded:', len(database))
  43. print("+-+-+-+-+-+-+-+-+-+-+-+-+")
  44. print("Available Options")
  45. print("a. Enter a new holiday package")
  46. print("b. Display Inventory (all destinations)")
  47. print('c. Search for a package (view details)')
  48. print('d. Delete a holiday package')
  49. print('e. Show all holiday packages with seasonal discount')
  50. print('f. Show all holiday packages with no discount')
  51. print('q. Quit')
  52. print('Choose an option (a to f) or q to Quit ')
  53. print()
  54. menu = input("Enter a option from list above:")
Add Comment
Please, Sign In to add comment