Abby has always dreamed of having her own ice cream shop. Now as a young entrepreneur she has decided to pursue her dream, but s
he 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. 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.
Best Practices to Follow:
Write detailed comments and doc-strings.
Use logical variable names with a consistent convention.
Organize and structure your code for readability.
Use hand calculations to verify the formulas in your code. I.e. write your own test cases to check correctness.
Create the text-based, menu interface
Write a Python script with a menu driven, text-based user interface that looks like this:
Expenses:
1. Cost per serving: 1.0
2. Labor rate per hour: 7.5
3. Shop rental per month: 800
4. Utilities per month: 150
5. Advertising budget per month: 100
Income:
6. Selling price (each): 4.0
7. Servings sold per month: 500
It is because many people want to be perfect just at the start, but there is always room to improvement, but people don't accept that, so they don't want to be better than what they are already, so the don't revise themselves or anything.
The best scenario is when a program suffers from frequent
page faults. In the situations when a kernel thread experiences a page fault,
another kernel thread can be switched in; something a single-threaded process
will not be capable of doing. Another best circumstance is when a program has
to wait for other systems events.