WAP to input the cost price and selling price of an article. If the selling price is more than the cost price , calculate and display the profit percentage.
Answers
Answered by
1
cp = float(input("cost price: "))
sp = float(input("sell price: "))
if sp > cp:
print(f"profit: {(sp / cp - 1) * 100:.2f}%")
Similar questions