Skip to content

PedroSilva370/Market-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Inventory Control System

A simple Python project that simulates basic stock management operations. It integrates key programming concepts in a practical scenario.

Overview

The system allows you to:

  • List all products
  • Identify out-of-stock items
  • Calculate total inventory value
  • Filter available promotions
  • Search for products with validation and error handling

Concepts Applied

  • Lists, dictionaries, sets, and tuples
  • Conditional logic (if, for)
  • Set operations
  • Exception handling (try, except, raise, finally)

How It Works

  • Products are stored as a list of dictionaries (name, price, quantity)
  • Out-of-stock items are collected in a set
  • Total value is calculated using price × quantity (only in-stock items)
  • Promotions are filtered using set difference
  • User input is validated; empty input raises a ValueError, and the program always finalizes the search with finally

Example Output

--- Inventory --- Rice - $ 5.99 - 50 units ...

--- Out of Stock Products ---

  • Beans
  • Olive Oil

Total inventory value: $ 787.50

  • Rice
  • Coffee
  • Pasta

Enter the product name: Rice Name: Rice | Price: $ 5.99 | Quantity: 50 --- Search completed ---

How to Run

python filename.py

Author

Pedro Gaudencio

About

A Python-based inventory control system that manages products, calculates total stock value, identifies out-of-stock items, filters available promotions using set operations, and allows product search with input validation and exception handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages