Kami Export - Sample Project Report
Kami Export - Sample Project Report
PROJECT TOPIC:
SHOP MANAGEMENT
Submitted by:
Name:ARJUN AHLAWAT
Class: 12 A
UNDER THE GUIDANCE OF:
RANVIJAY SINGH, PGT (CS)
CERTIFICATE
Principal
ACKNOWLEDGMENT
HARDWARES
1. Desktop Computer / Laptop
2. Mobile Phone
SOFTWARES
1. Python (Latest Version)
2. MySQL
3. MySQL-Connector-Python,Requests,Wikipedia-
API, Datetime, Pyfiglet Modules
TABLE OF CONTENTS
inventory = {}
def add_item():
item_name = input("Enter item name:
").strip()
if item_name in inventory:
print(f"{item_name} already exists.
Updating quantity.")
quantity = int(input(f"Enter quantity
to add for {item_name}: "))
inventory[item_name]['quantity'] +=
quantity
else:
price = float(input("Enter price for the
item: "))
quantity = int(input("Enter quantity:
"))
inventory[item_name] = {'price': price,
'quantity': quantity}
print(f"{item_name} added/updated
successfully.")
def view_inventory():
if not inventory:
print("Inventory is empty.")
return
print("\n--- Inventory ---")
print(f"{'Item':<15}{'Price':<10}{'Quantity
':<10}")
for item, details in inventory.items():
print(f"{item:<15}{details['price']:<10}{d
etails['quantity']:<10}")
print("-----------------\n")
def sell_item():
if not inventory:
print("Inventory is empty. Cannot sell
items.")
return
total_bill = 0
print("Enter 'done' when finished
selling.")
while True:
item_name = input("Enter item name
to sell: ").strip()
if item_name.lower() == 'done':
break
if item_name not in inventory:
print(f"{item_name} not found in
inventory.")
continue
quantity = int(input(f"Enter quantity
to sell for {item_name}: "))
if quantity >
inventory[item_name]['quantity']:
print(f"Not enough stock for
{item_name}. Available:
{inventory[item_name]['quantity']}")
continue
inventory[item_name]['quantity'] -=
quantity
total_cost = quantity *
inventory[item_name]['price']
total_bill += total_cost
print(f"Sold {quantity} of {item_name}
for ${total_cost:.2f}")
print(f"\nTotal Bill: ${total_bill:.2f}")
def main():
while True:
print("\n--- Shop Management System
---")
print("1. Add Item to Inventory")
print("2. View Inventory")
print("3. Sell Items")
print("4. Exit")
choice = input("Enter your choice (1-
4): ")
if choice == '1':
add_item()
elif choice == '2':
view_inventory()
elif choice == '3':
sell_item()
elif choice == '4':
print("Exiting... Thank you for using
Shop Management System!")
break
else:
print("Invalid choice. Please try
again.")
if __name__ == "__main__":
main()
OUTPUTS
--- Shop Management System ---
1. Add Item to Inventory
2. View Inventory
3. Sell Items
4. Exit
Enter your choice (1-4): 1
Enter item name: APPLE
Enter price for the item: 30
Enter quantity: 50
APPLE added/updated successfully.