Computer Science, asked by adrijamishra2007, 1 day ago

Write a python program to find the cost price of an item. Take input the total selling price of 15 items and the total profit earned.

Answers

Answered by NeuroticSpy
3

\red{ⲁnswer:}

Python Program to Calculate Profit or Loss

CP = float(input(" Please Enter the Cost Price of the product: "))

SP = float(input(" Please Enter the Sale Price of the product: "))

if(CP > SP):

   amount = CP - SP

   print("Total Loss Amount = {0}".format(amount))

elif(SP > CP):

   amount = SP - CP

   print("Total Profit = {0}".format(amount))

else:

   print("There is no Profit no Loss....")

OUTPUT

Please Enter the Cost Price of the product: 6000

Please Enter the Sale Price of the product: 4700

Total Loss Amount = 1300.0

Similar questions