()
| 1 | def menu(): |
| 2 | options = { |
| 3 | 1: {"title": "Add new customer details", "method": lambda: add()}, |
| 4 | 2: { |
| 5 | "title": "Modify already existing customer details", |
| 6 | "method": lambda: modify(), |
| 7 | }, |
| 8 | 3: {"title": "Search customer details", "method": lambda: search()}, |
| 9 | 4: {"title": "View all customer details", "method": lambda: view()}, |
| 10 | 5: {"title": "Delete customer details", "method": lambda: remove()}, |
| 11 | 6: {"title": "Exit the program", "method": lambda: exit()}, |
| 12 | } |
| 13 | |
| 14 | print(f"\n\n{' ' * 25}Welcome to Hotel Database Management Software\n\n") |
| 15 | |
| 16 | for num, option in options.items(): |
| 17 | print(f"{num}: {option.get('title')}") |
| 18 | print() |
| 19 | |
| 20 | options.get(int(input("Enter your choice(1-6): "))).get("method")() |
| 21 | |
| 22 | |
| 23 | def add(): |
no test coverage detected