CodeSolved

Solved Programming Questions & Exercises

Calculate the daily profit of ice cream sales

Practice Easy 2113/ Download 786 Views

Write a program that allows an ice cream seller to calculate the amount of interest from the sale of ice cream by entering the cost and daily sales information. This program must receive the following values ​​from the user:

  • Cost of buying or making ice cream bread
  • The cost of buying or building your own ice cream
  • The sale price of any ice cream to customers
  • The number of ice cream sold in a day

Then, using this data, calculate and display the daily net profit. For example, if the cost of ice cream bread is 4,000 tomans, the cost of ice cream of 4,000 tomans, the price of the ice cream is 2 thousand tomans and the number of sales is 2, the program should display the entire day's profit.

The program can help the ice cream shop easily manage and analyze its daily income and profit.

4 Answers

Bread=input("enter your bread : ")
Bread=int(Bread)
Purchase_price=input("enter your Purchase price : ")
Purchase_price=int(Purchase_price)
Selling_price=input("enter your Selling price : ")
Selling_price=int(Selling_price)
One_day_sale=input("enter your One day sale : ")
One_day_sale=int(One_day_sale)
Profit=((Selling_price)-(Bread+Purchase_price))*One_day_sale
print(Profit)
def calculate_profit():
    cone_cost = float(input("Enter the cost of ice cream cone: "))
    ice_cream_cost = float(input("Enter the cost of ice cream: "))
    selling_price = float(input("Enter the selling price per ice cream: "))
    quantity_sold = int(input("Enter the number of ice creams sold: "))

    total_cost = (cone_cost + ice_cream_cost) * quantity_sold
    total_revenue = selling_price * quantity_sold
    profit = total_revenue - total_cost

    print("Daily profit:", profit)

calculate_profit()
Ai Download Python
ice_bread = int(input("How much does it cost? "))
ice_self = int(input("How much did you pay?"))
ice_price = int(input("How much did you sale for each?"))
ice_much = int(input("How many ice cream did you sale?"))

hazine_kharid = ice_bread + ice_self
forush = ice_price * ice_much
hazine_total = hazine_kharid * ice_much
soode_total = forush - hazine_total

print(soode_total)
User 5798 Download Python
bread = int(input("cost of bread: "))
ice_cream = int(input("cost of making ice cream: "))
sell = int(input("price of selling ice cream : "))
number = int(input("number of sell per day: "))
cal = number * (sell - (bread + ice_cream))
print(f"the profit of this day is {cal}")
User 5786 Download Python

Submit answer

Submitting answers is currently unavailable.

×
×
Close