Write a program that manages an ice cream stand using python.

(1 patron review)

$7.00

View Details
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Instant
Download

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.

1 review for Write a program that manages an ice cream stand using python.

  1. Madison Hayes

    Thanks. The code is working well. Will come again

Only logged in customers who have purchased this product may leave a review.


You may also like…

Patron Details

Additional information

Your Solution

Product
Quantity
Total
×
Write a Python program for an online MoonBucks coffee order
$2.00
Cart Subtotal $2.00
Order Total $2.00

  • Pay with your credit card.