حالت آفلاین — محتوا از حافظهٔ کش نمایش داده می‌شود
همهٔ تمرین‌ها

محاسبه سود روزانه فروش بستنی

تمرین آسان 2285 visibility link download flag

برنامه‌ای بنویسید که به یک بستنی‌فروش امکان دهد با وارد کردن اطلاعات مربوط به هزینه‌ها و فروش روزانه، میزان سود حاصل از فروش بستنی‌ها را محاسبه کند. این برنامه باید از کاربر مقادیر زیر را دریافت نماید:

  • هزینه خرید یا ساخت نان بستنی
  • هزینه خرید یا ساخت خود بستنی
  • قیمت فروش هر بستنی به مشتریان
  • تعداد بستنی‌های فروخته شده در یک روز

سپس با استفاده از این داده‌ها، سود خالص روزانه را محاسبه و نمایش دهد. به عنوان مثال، اگر هزینه نان بستنی ۲ هزار تومان، هزینه بستنی ۵ هزار تومان، قیمت فروش هر بستنی ۱۰ هزار تومان و تعداد فروش ۲۰ عدد باشد، برنامه باید سود کل روز را به صورت عددی نمایش دهد.

این برنامه می‌تواند به بستنی‌فروش کمک کند تا به راحتی درآمد و سود روزانه خود را مدیریت و تحلیل نماید.

👨‍💻 5 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد

پاسخ‌ها 19

while True:
    bp = int(input("bread price:"))
    ip = int(input("ice cream price:"))
    sp = int(input("sell price:"))
    dsv = int(input("Daily selling:"))

    di = ((ip+sp)-sp)*dsv
    print("Daily income:",di)
نان = float(input("هزینه نان بستنی: "))
بستنی = float(input("هزینه بستنی: "))
فروش = float(input("قیمت فروش هر بستنی: "))
تعداد = int(input("تعداد فروش روزانه: "))

هزینه_هر_بستنی = نان + بستنی
سود_هر_بستنی = فروش - هزینه_هر_بستنی
سود_روزانه = سود_هر_بستنی * تعداد

print("سود هر بستنی:", سود_هر_بستنی)
print("سود خالص روزانه:", سود_روزانه)
cost_cone = int(input())
cost_ice_cream = int(input())
selling_price = int(input())
quantity = int(input())

total_cost = (cost_cone + cost_ice_cream) * quantity
total_income = selling_price * quantity
profit = total_income - total_cost

print(profit)
make_a_ice_cream_bread= int(input("cost1:"))
make_a_ice_cream= int(input("cost2:"))
price= int(input("sell:"))
number= int(input("how many sell?"))
cost= make_a_ice_cream+make_a_ice_cream_bread
profit= price-cost
all_profit= profit*number
print(f"all:{all_profit}")
def profit(bread, ice_cream, ice_cream_sales, quantity):

    profit_ice_cream_sales = ice_cream_sales - (bread + ice_cream)
    return profit_ice_cream_sales * quantity

bread = int(input("Enter bread: "))
ice_cream = int(input("Enter ice_cream: "))
ice_cream_sales = int(input("Enter ice_cream_sales: "))
quantity = int(input("Enter quantity: "))

x = profit(bread, ice_cream, ice_cream_sales, quantity)
print(f"a profit {x}")

```a=int(input('hazinek bastani : '))
b=int(input('hazineh nan : '))
c=int(input('ghimaj har bastani : '))
d=int(input('tadad forosh : '))
j=a+b
f=jd
z=cd
s=z-f
print( s)

```

# ورودی های کاربر:
a = int(input("gheymat nan: "))
b = int(input("hazine sakht bastani: "))
c = int(input("gheymat foroosh: "))
d = int(input("tedad foroosh dar rooz: "))
# محاسبه سود روزانه:
hazine = a + b
sood = (c * d) - (hazine * d)
print(sood)
n=int(input("sakht non bastani:"))
b=int(input("sakht bastani:"))
gh=int(input("gheymat bastani:"))
t=int(input("tedad bastani:"))
sood= gh * t
zarar = (n * t)+(b*t)
skh = sood - zarar
print(skh)


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}")

ارسال جواب

جوابت را با Markdown بنویس و ثبت کن

×
بستن