Description
Write a program that manages an ice cream stand, using python .
To start, your store has 5 types of ice cream, and 6 servings of each type. You will then receive 30 random orders for one ice cream cone each. Example ice cream varieties:
- Vanilla
- Mint Chocolate Chip
- Cookies and Cream
Your solution must also use each of the following structures at least once:
- if statement(s)
- function(s) – cannot just be the entire program, must be a smaller chunk of code
- loop(s)
- list(s)
Input
- Initialize your 5 ice cream types and the inventory for each type in two lists.
- Randomly generate 30 orders (do not use user input for this, it must be random)
Since you store your ice cream types as a list, then you can generate a random index 0-4 and then use the ice cream type that lives at that index in the list.
Process the data
- After an order is received, decrement the amount of that ice cream type that is left in your inventory.
- If there is 0 inventory for that ice cream type, instead print an apology to the user. This apology should use good punctuation, e.g. “Sorry! We’re all out of Rocky Road!” Do not leave off punctuation at the end of the second sentence.
Madison Hayes –
Thanks. The code is working well. Will come again