stock = {
"Alts": 3190,
"Mains": 146,
"2010": 2,
}
def show_stock():
print("Account stock Stock:")
for item, quantity in stock.items():
print(f"{item}: {quantity}")
def add_stock(item, amount):
if item in stock:
stock[item] += amount
else:
stock[item] = amount
print(f"Added {amount} {item}(s)")
def remove_stock(item, amount):
if item in stock and stock[item] >= amount:
stock[item] -= amount
print(f"Removed {amount} {item}(s)")
else:
print("Not enough stock or item doesn't exist.")
show_stock()
To embed this project on your website, copy the following code and paste it into your website's HTML: