Skip to content

itsviseph/shopping-cart-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ 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.

▢️ Running the App

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages