Question 14: Input Party Supplies

Scenario: Party Supplies Organizer

Emma is organizing a picnic and needs to prepare picnic baskets. Each picnic basket will contain sandwiches, drinks, and snacks.

Write a Python program to calculate the total number of items Emma will need for the picnic.

  1. Start by asking for Emma’s name and store it in a variable called name.

  2. Ask how many picnic baskets she wants to make and store that number in a variable called baskets.

  3. Ask how many sandwiches she wants per basket and store that number in a variable called sandwiches_per_basket.

  4. Ask how many drinks she wants per basket and store that number in a variable called drinks_per_basket.

  5. Ask how many snacks she wants per basket and store that number in a variable called snacks_per_basket.

  6. Multiply each item by the number of baskets to get the total items:

    • Total sandwiches = sandwiches_per_basket * baskets
    • Total drinks = drinks_per_basket * baskets
    • Total snacks = snacks_per_basket * baskets
  7. Add all the totals and store in a variable called total_items.

  8. Print a friendly message like this:

    • “Hi [name]! You need a total of [total_items] items to fill [baskets] picnic baskets.”
Write what you are looking for, and press enter to begin your search!