Q. Write a program to input cost price, profit (in percentage) and display the selling price.

Answer :-

cost_price = float(input("Enter cost price :- "))
profit   = float(input("Enter profit (in percentage) :- "))

print("Selling price = ",  (( 100 + profit)/100 ) * cost_price )

Output :-

Enter cost price  :- 100
Enter profit (in percentage)  :- 10
Selling price =  110.00000000000001

>>> 

Enter cost price :- 7842
Enter profit (in percentage) :- 0.52
Selling price =  7882.778399999999

>>> 


2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. The program here is wrong, it would be :- ((100+profit)/100)*cost_price

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post