π Shopping Cart CLI App
A simple, beginner-friendly Command Line Interface (CLI) shopping cart program written in Python. This project helped me learn core concepts like functions, loops, conditionals, and clean code structure.
π Features
View available products
Add items to the cart
View items already in the cart
Calculate total amount
Checkout and exit program
Clean function-based structure (easy to upgrade)
π§ What I Learned
How to build a CLI program
How to structure code using functions
How to avoid code duplication
How to loop until the user chooses to exit
Basic logic for cart systems
π§© How It Works
The program shows a menu:
add item
view cart
checkout
end
When the user selects an option, the respective function executes:
add_item() β add products
view_cart() β show cart + total
view_items() β show available catalog
On checkout, the cart is shown one last time and the program ends.
Make sure Python is installed.
Clone or download the repo:
git clone https://github.com/itsviseph/shopping-cart-cli.git
Navigate into the project folder:
cd shopping-cart-cli
Run the app:
python3 shop-app.py
π¦ Project Structure shopping-cart-cli/ β βββ shop-app.py # Main Python application βββ README.md # Project documentation
π Future Improvements
Some ideas for expanding this project:
Remove items from cart
Add quantity support
Add discount codes
Add taxes
Save receipt to a file
Convert to Object-Oriented version
Build a GUI using Tkinter
π€ Contributing
If you want to contribute, feel free to open an issue or send a pull request!
π License
This project is open-source and free to use.