Complete-Python-Mastery
Complete-Python-Mastery copied to clipboard
Billing Stock System
--- input Section ---
Enter SKU ( Unique Number ) : 101
Enter Product Name : Books
Enter Product QT : 20
Enter Single Book Price : 120/-
Do you Want Add more [Y/N]
Y
Enter SKU ( Unique Number ) : 102
Enter Product Name : toy
Enter Product QT : 5
Enter Single Book Price : 560/-
Do you Want Add more [Y/N]
Y
Enter SKU ( Unique Number ) : 103
Enter Product Name : Samosa
Enter Product QT : 250
Enter Single Book Price : 20/-
Do you Want Add more [Y/N]
N
--- Output Section---------
------ Search Item ------
Enter Product Item Form SKU No. 103
Total Cost : 5000/-
Product Name : Samosa
QT : 250
Single Price : 20/-
https://github.com/developology/Billing-Stock-System.git
https://github.com/amrita-prog/Billing-Stock-System
https://github.com/Aashishdev01/python/blob/main/billing%20stock%20system
data = {}
while True:
sku = int(input("Enter SKU (Unique Number): "))
product_name = input("Enter Product Name: ")
product_qty = int(input("Enter Product QT: "))
product_price = int(input("Enter Single Product Price: "))
data[sku] = {
"name": product_name,
"qty": product_qty,
"price": product_price
}
more = input("Do you Want Add more [Y/N]: ").strip().lower()
if more != 'y':
break
print("\n--- Output Section ---------")
print("------ Search Item ------")
search_sku = int(input("Enter Product Item Form SKU No.: "))
if search_sku in data:
item = data[search_sku]
total_cost = item["qty"] * item["price"]
print(f"Total Cost : {total_cost}/-")
print(f"Product Name : {item['name']}")
print(f"QT : {item['qty']}")
print(f"Single Price : {item['price']}/-")
else:
print("Item not found!")