Start
Set shopping cart as
an empty list
Define dictionary of available
items in store with cost
A
Display
While True print "1. View Store Items”
True print "2. Add Item to Cart"
loop print "3. Remove Item from Cart"
print "4. View Cart"
print "5. Checkout and Exit"
False
User enter their choice (1-5)
True
Choice Show
==”1" display_store_items()
False
Choice
True Input the name of the
item to add A
==”2"
False
If item in True Add the item in
store_ite
ms() shopping_cart()
False
Display “{item} added to your
cart”
Display “{item} not available”
True If True
Choice
== “3' shopping Show display_cart()
_cart()
False
False
Input the name of the
item to remove
Display “Your cart is empty”
A True
If item in
shopping Remove the item in
True _cart() shopping_cart()
Choice
== “4” Show display_cart()
False
Display “{item} has been
False
removed to your cart”
Display “{item} not in cart”
A
True If True
Choice
== “5” shopping Show display_cart()
_cart()
False
False
Display "Thank you for
shopping! Exiting now."
Display "Your cart is empty.
Exiting now."
End
Display "Invalid choice, please
enter a number between 1 and 5."