Skip to main content

Posts

Showing posts with the label Write a Python program to calculate profit or loss.

ads1

Python Condition , 11. Write a Python program to calculate profit or loss.

11. Write a Python program to calculate profit or loss. Solution :-  sp = int(input("Enter the Selling Price :-")) cp = int(input("Enter the Cost Price :- ")) if(sp>cp):     amount = sp-cp     print("The Profit is :-",amount) elif(cp>sp):     amount = cp-sp     print("The Loss is :-",amount) else:     print("There is NoProfit or NoLoss",amount) Output :-  

ads2