Advertisement
skip420

ProductCost

Apr 12th, 2022
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. # Python Program to Calculate Profit or Loss
  2.  
  3. actual_cost = float(input(" Please Enter the Actual Product Price: "))
  4. sale_amount = float(input(" Please Enter the Sales Amount: "))
  5.  
  6. if(actual_cost > sale_amount):
  7.     amount = actual_cost - sale_amount
  8.     print("Total Loss Amount = {0}".format(amount))
  9. elif(sale_amount > actual_cost):
  10.     amount = sale_amount - actual_cost
  11.     print("Total Profit = {0}".format(amount))
  12. else:
  13.     print("No Profit No Loss!!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement