This project is a simple Python-based restaurant menu system that allows customers to order from a menu, specify the number of plates they wish to order, and calculates the total cost dynamically. The system offers three categories of food: Normal, Swallow, and Soup, each with its respective price. It also tracks the time of each purchase.
- Multiple Categories: The system allows customers to choose from three food categories: Normal, Swallow, and Soup.
- Cost Calculation: Automatically calculates the total cost based on the number of plates ordered.
- Order Summary: Displays an order summary with the items selected, quantities, and the total cost.
- Timestamp: Tracks the time of the purchase.
- User-Friendly: Prompts the user to select food categories and quantity in a simple and intuitive manner.
-
Clone the repository to your local machine:
git clone https://github.com/databyharriet/Restaurant-Menu-System.git
-
Make sure you have Python installed (version 3.x+). You can download Python from here.
-
Navigate to the project folder and run the Python script.
The menu is stored in dictionaries for each category (Normal, Swallow, Soup), containing the available items and their corresponding prices.
normal = {'rice': 200, 'dodo': 150, 'beans': 100, 'kpomo': 300, 'salad': 250}
swallow = {'garri': 400, 'semo': 350, 'fufu': 450, 'amala': 500}
soup = {'egusi': 700, 'ewedu': 650, 'gbegiri': 600, 'ofe nsala': 750, 'ofe owerri': 800, 'oha': 850}The program allows the user to select a category and meal, enter the quantity, and then calculates the cost. The process is repeated until the user types 'done'.
while True:
category = input("What category would you like to order from (normal, swallow, soup) or type 'done' to finish: ").lower()
if category == 'done':
break
...For each selected meal, the script calculates the cost based on the number of plates ordered.
cost = num_plates * price_per_plate
total_cost += costAt the end, the program displays the final summary of the order, including itemized costs and total cost.
if order_list:
print("\nYour final order:")
for item, quantity, cost in order_list:
print(f"{quantity} plates of {item}: {cost} Naira")
print(f"Total cost: {total_cost} Naira at {purchasing_time}")- Clone or download the repository.
- Open the
restaurant_menu.pyfile. - Run the script in your preferred Python environment (e.g., Jupyter Notebook, Command Line Interface, or Python IDE).
- Follow the prompts to interact with the menu and place your order.
python restaurant_menu.pyHere is an example of the interaction when running the script:
Menu Options:
Normal: {'rice': 200, 'dodo': 150, 'beans': 100, 'kpomo': 300, 'salad': 250}
Swallow: {'garri': 400, 'semo': 350, 'fufu': 450, 'amala': 500}
Soup: {'egusi': 700, 'ewedu': 650, 'gbegiri': 600, 'ofe nsala': 750, 'ofe owerri': 800, 'oha': 850}
What category would you like to order from (normal, swallow, soup) or type 'done' to finish: normal
Available options: {'rice': 200, 'dodo': 150, 'beans': 100, 'kpomo': 300, 'salad': 250}
Please choose your meal: rice
How many plates you wan order?: 2
You have successfully added 2 plates of rice to your order. Cost: 400 Naira.
What category would you like to order from (normal, swallow, soup) or type 'done' to finish: done
Your final order:
2 plates of rice: 400 Naira
Total cost: 400 Naira at 2025-04-08 12:00:00
Feel free to fork this repository, submit pull requests, or open issues for suggestions and improvements. Any contributions are welcome!
This project is open-source and licensed under the MIT License.