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.
Start by asking for Emma’s name and store it in a variable called name
.
Ask how many picnic baskets she wants to make and store that number in a variable called baskets
.
Ask how many sandwiches she wants per basket and store that number in a variable called sandwiches_per_basket
.
Ask how many drinks she wants per basket and store that number in a variable called drinks_per_basket
.
Ask how many snacks she wants per basket and store that number in a variable called snacks_per_basket
.
Multiply each item by the number of baskets to get the total items:
sandwiches_per_basket * baskets
drinks_per_basket * baskets
snacks_per_basket * baskets
Add all the totals and store in a variable called total_items
.
Print a friendly message like this:
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!