Q. Write a program that accepts cost of goods sold (cgos) revenue generated, operating costs (oc) and prints Gross profit, net profit and net profit percentage.
[Hint : Net profit = Revenue - cgos - oc]
Answer =
cgos = float(input("Enter cost of goods sold :-")) rev_gen = float(input("Enter revenue generated :-")) os = float(input("Enter operating costs :- ")) print("Gross profit = ", rev_gen - cgos) net_profit = rev_gen - cgos - os print("Net profit = ", net_profit ) npp = net_profit / rev_gen * 100 print("Net profit percentage = " , npp)
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )