print ("Hello Good day")
print ("-----------")
print ("How may i help you")
print ("[1] Items")
print ("[2] Back")
print ("[3] Check my Items")
choice = int(input("Enter the number of choice"))
if choice == 1:
input("Press Enter to clear the screen...")
print ("-----------------------")
print ("Choose some items here")
print ("-----------------------")
print ("Heres our Items")
print ("[1] NikeHoodie")
print ("[2] NikeSpellout")
print ("[3] NikeAlumni")
print ("[4] NikeBigswoosh")
print ("[5] NikeSideswoosh")
print ("[6] NikeSb")
print ("-----------------------")
print ("-----------------------")
add_choice = input("Enter your choice: ")
if add_choice in == '0':
continue
elif add_choice in ['1', '2', '3', '4', '5', '6']:
quantity = int(add_choice) * 6
inventory.add_stocks(quantity)
print(f"Added {quantity} to all products in inventory.")
else:
print("Invalid choice. Please enter again: ")
elif choice == '2':
product = input("Enter the product name: ")
success = inventory.make_sale(product)
if success
print("Sale seccessful.")
elif choice == '3':
inventory.view_inventory()
elif choice == '4':
point_of_sale(inventory)
elif choice == '5':
break
else:
print("Invalid choice. Please enter again.")
if __name__ == "__main__":
main()
input("Press Enter to clear the screen...")
class ShoppingCart:
def __init__(self):
self.items = []
def add_item(self, item_name, qty):
item = (item_name, qty)
self.items.append(item)
def remove_item(self, item_name):
for item in self.items:
if item[0] == item_name:
self.items.remove(item)
break
def calculate_total(self):
total = 0
for item in self.items:
total += item[1]
return total
cart = ShoppingCart()
cart.add_item("NikeAlumni", 4)
cart.add_item("NikeSpellout", 2)
cart.add_item("NikeHoodie", 1)
print("NikeAlumni, NikeSpellout, NikeHoodie:")
for item in cart.items:
print(item[0], "-", item[1])
total_qty = cart.calculate_total()
print("Total Quantity:", total_qty)
print("\nUpdated Items in Cart:")
for item in cart.items:
print(item[0], "-", item[1])
total_qty = cart.calculate_total()
print("Total Quantity:", total_qty)