Q. Write a program that inputs cost price and selling price for 10 items. The prints if the overall profit occurred or loss occurred.


Answer = 




total_cost = 0
total_sell = 0

for i in range(10):
    cost = float(input("Enter cost price :-"))
    sell = float(input("Enter selling price :-"))
    total_cost += cost
    total_sell += sell

if total_cost > total_sell :
    print("Loss occurred")
else :
    print("profit occurred")



Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post