Python program to find Profit Or Loss

ap = float(input("Please Enter the Actual Product Price : "))
sa = float(input("Please Enter the Sales Amount : "))
if(ap > sa):
    amount = ap - sa
    print("Total Loss Amount = %d"%(amount))
elif(sa > ap):
    amount = sa - ap
    print("Total Profit = %d"%(amount))
else:
    print("No Profit No Loss !!!")

OUTPUT:

Please Enter the Actual Product Price : 20
Please Enter the Sales Amount : 50
Total Profit = 30

Sharing Is Caring

Leave a Comment