Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Module Lab Assessment 3: Abby's Ice Cream Shop Text from original Mindtap Assessment Modified for this class by: Updated: Introduction Abby has always dreamed of

Module Lab Assessment 3: Abby's Ice Cream Shop

Text from original Mindtap Assessment

Modified for this class by:

Updated:

Introduction

Abby has always dreamed of having her own ice cream shop. Now as a young entrepreneur she has decided to pursue her dream, but she needs some help in determining the financial viability of her plan. She has come up with a list of income and expense parameters and needs a simple program to input these parameters and calculate the monthly profit or loss as well as performing some variable cost what-if analysis.

Grading

The assignment will be graded by instructor criteria list below. So, you can use the auto grading as a guide, the actual grade will be different. The final code must be submitted in Blackboard with the appropriate documentation.

We will not be doing the "make it your own" task as referred in Mindtap.

What you need to know about Abby's shop

For expenses, she has:

Raw ingredient cost per serving

Hourly labor rate

Real estate monthly rental

Utilities per month

Monthly advertising budget

On the income side, she has:

Selling price per serving (assume only one size for simplicity)

Number of servings sold per month

Based on some research, she has determined that a single employee can run the shop and she plans to have the shop open eight hours per day and six days per week (48 hours per week). Assume 4 weeks per month.

Per the instructions, the problem prompts the user for the following information:

* Cost per ice cream serving

* Employee labor rate (per hour)

* Shop rental (per month)

* Utilities (per month)

* Advertising (per month)

* Selling price (each)

* Ice cream servings sold per month

Your program needs to operate in a loop in which a menu is displayed with options:

Expenses:

1. Cost per serving:

2. Labor rate per hour:

3. Shop rental per month:

4. Utilities per month:

5. Advertising budget per month:

Income:

6. Selling price (each):

7. Servings sold per month:

Analysis:

8. Profit/Loss Calculation

9. "What If" analysis with 10% variance

Enter Selection (0 to Exit):

Menu items:

1-7: must display the current value of the category and allow the user to change it.

8: must display a single value indicating the amount of profit or loss.

9: Calculate "what if" scenario while holding the income fixed, vary the expenses from - to + 10 percent in 2 percent increments and outputting the values and the resulting profit or loss in a table. Finally, while holding the expenses fixed, vary the income parameters from - to + 10 percent in 2 percent increments.

10: is not required for this project.

Sample Output 1:

Enter Selection (0 to Exit): 8

The Ice Cream Shop will have a monthly profit/loss of 90.0 or 4.0 per serving.

Sample Output 2:

Enter Selection (0 to Exit): 9

Varying the Expenses +/-10%:

Percent: -10 Expenses: 1719.0 Profit/Loss: 281.0

Percent: -8 Expenses: 1757.2 Profit/Loss: 242.8

Percent: -6 Expenses: 1795.4 Profit/Loss: 204.6

Percent: -4 Expenses: 1833.6 Profit/Loss: 166.4

Percent: -2 Expenses: 1871.8 Profit/Loss: 128.2

Percent: 0 Expenses: 1910.0 Profit/Loss: 90.0

Percent: 2 Expenses: 1948.2 Profit/Loss: 51.8

Percent: 4 Expenses: 1986.4 Profit/Loss: 13.6

Percent: 6 Expenses: 2024.6 Profit/Loss: -24.6

Percent: 8 Expenses: 2062.8 Profit/Loss: -62.8

Varying the Income +/-10%:

Percent: -10 Income: 1800.0 Profit/Loss: -110.0

Percent: -8 Income: 1840.0 Profit/Loss: -70.0

Percent: -6 Income: 1880.0 Profit/Loss: -30.0

Percent: -4 Income: 1920.0 Profit/Loss: 10.0

Percent: -2 Income: 1960.0 Profit/Loss: 50.0

Percent: 0 Income: 2000.0 Profit/Loss: 90.0

Percent: 2 Income: 2040.0 Profit/Loss: 130.0

Percent: 4 Income: 2080.0 Profit/Loss: 170.0

Percent: 6 Income: 2120.0 Profit/Loss: 210.0

Percent: 8 Income: 2160.0 Profit/Loss: 250.0

My Code:

# Abby's Ice Cream Shop def print_menu(serving_cost=1, labor_rate=7.5, shop_rental=800, utilities=150, advertising=100, selling_price=4.00, servings_per_month=1000): """ Shows the menu and prints the shop data. """ print("Expenses:") print("1. Cost per serving: {:0.1f}".format(serving_cost)) print("2. Labor rate per hour: {:0.1f}".format(labor_rate)) print("3. Shop rental per month: {}".format(shop_rental)) print("4. Utilities per month: {}".format(utilities)) print("5. Advertising budget per month: {}".format(advertising)) print() print("Income:") print("6. Selling price (each): {:0.1f}".format(selling_price)) print("7. Servings sold per month: {}".format(servings_per_month)) print() print("Analysis:") print("8. Profit/Loss Calculation") print('9. "What If" analysis with 10% variance') print() def calc_income(selling_price, servings_per_month): """ Helper function to compute for income """ # compute income income = selling_price * servings_per_month return income def calc_expenses(serving_cost, labor_rate, shop_rental, utilities, advertising, servings_per_month): """ Helper function to compute for expenses """ # compute costs fixed_costs = shop_rental + utilities + advertising variable_costs = servings_per_month * serving_cost wages = labor_rate * 8 * 6 * 4 # 8 hrs/ day * 6 days a week * 4 weeks # compute total expenses expenses = fixed_costs + variable_costs + wages return expenses def print_profit_loss(income, expenses, servings_per_month): """ Computes for the profit/loss and prints it together with the normalized profit/loss. """ # compute profit profit = income - expenses normalized_profit: object = profit / servings_per_month # print details print("The Ice Cream Shop will have a monthly profit/loss of {:0.1f} or {:0.2f} per serving.".format(profit, normalized_profit)) print() def print_what_if(income, expenses, servings_per_month): """ Computes and display varying expenses and income from -10 to +10 in increments of 2 """ print() # print varying expenses print("Varying the Expenses From -10% to +10%:") for pct in range(-10, 10, 2): # compute expenses with variation this_expenses = expenses * (1 + pct / 100) # compute profit with expenses variation this_profit = income - this_expenses # print details print("Percent: {} Expenses: {:0.1f} Profit/Loss: {:0.1f}".format(pct, this_expenses, this_profit)) print() # print varying income print("Varying the Income From -10% to +10%:") for pct in range(-10, 10, 2): # compute income with variation this_income = income * (1 + pct / 100) # compute profit with income variation this_profit = this_income - expenses # print details print("Percent: {} Income: {:0.1f} Profit/Loss: {:0.1f}".format(pct, this_income, this_profit)) print() def main(): # default starting values serving_cost = 1.00 labor_rate = 7.50 shop_rental = 800 utilities = 150 advertising = 100 servings_per_month = 1000 selling_price = 4.00 # show the menu print_menu() # prompt user for selection selection = int(input("Enter Selection (0 to Exit): ")) # loop while selection is not equal to 0 while selection != 0: # compute income income = calc_income(selling_price, servings_per_month) # compute expenses expenses = calc_expenses(serving_cost, labor_rate, shop_rental, utilities, advertising, servings_per_month) # Cost per serving if selection == 1: serving_cost = float(input(" Enter new cost per serving: ")) # Labor rate per hour elif selection == 2: labor_rate = float(input(" Enter new Labor rate per hour: ")) # Shop rental per month elif selection == 3: shop_rental = float(input(" Enter new Shop rental per month: ")) # Utilities per month elif selection == 4: utilities = float(input(" Enter new Utilities per month: ")) # Advertising budget per month elif selection == 5: advertising = float(input(" Enter new Advertising budget per month: ")) # Selling price elif selection == 6: selling_price = float(input(" Enter new Selling price (each): ")) # Servings sold per month elif selection == 7: servings_per_month = int(input(" Enter new Servings sold per month: ")) # Profit/Loss Calculation elif selection == 8: print_profit_loss(income, expenses, servings_per_month) # What If Analysis elif selection == 9: print_what_if(income, expenses, servings_per_month) # show the menu print_menu() # prompt user for selection selection = int(input("Enter Selection (0 to Exit): ")) if __name__ == '__main__': main()

***************************

Mindtap Error

Create the text based menu interface shown above using the default values.

0

0.00 out of 18.75

The user can set the expenses from the menu

5

0 out of 5 checks passed. Review the results below for more details.

Checks

Test Case Incomplete

User can set the cost per serving

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Decisions Based On Data Analytics For Business Excellence

Authors: Bastian Weber

1st Edition

9358681683, 978-9358681680

More Books

Students also viewed these Databases questions

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago