https://github.com/goyal-coder/concession-stand-python
Keep ordering and enjoying.
https://github.com/goyal-coder/concession-stand-python
Last synced: about 1 year ago
JSON representation
Keep ordering and enjoying.
- Host: GitHub
- URL: https://github.com/goyal-coder/concession-stand-python
- Owner: goyal-coder
- Created: 2025-02-28T07:01:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-28T07:02:33.000Z (over 1 year ago)
- Last Synced: 2025-02-28T14:15:23.247Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Overview
This Python script simulates a Concession Stand where users can:
✅ View a menu of available items with prices.
✅ Select items to add to their cart.
✅ See the updated cart and total cost after each selection.
✅ Get a final order summary upon checkout.
How It Works
A dictionary (menu) stores food items with their prices.
A loop allows users to enter items by name to add them to the cart.
The program checks if the item exists:
✅ If found, it's added to the cart, and the total is updated.
❌ If not found, an error message appears.
When the user enters "q", the program exits and displays a final receipt showing:
Items purchased.
Quantity of each item.
Grand total.
The program ensures proper formatting and error handling.
Features
🔹 Displays menu in a readable format.
🔹 Handles duplicate items in the cart.
🔹 Prevents invalid inputs.
🔹 Neatly formatted final order summary.
This script is a great example of dictionaries, loops, conditionals, and user input handling in Python! 🚀