Skip to content

Write a Python program to calculate profit or loss.

PYTHON

Write a Python program to calculate profit or loss.

sp = int(input("Enter the Selling price :- ")) cp = int(input("Enter the Cost price :- ")) if (sp>cp): profit = sp-cp print("The Profit is :- ",profit) elif (cp>sp): loss = cp-sp print("The Loss is :- ",loss) else: print("No loss and No Profit....")

OUTPUT