Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python lang - Define function that displays shopping list of randomfoods/items. Give item name and quantity - Define function that is called additems(items,itemsToAdd): - Use
python lang
- Define function that displays shopping list of randomfoods/items. Give item name and quantity
- Define function that is called additems(items,itemsToAdd):
- Use a forloop to add items and update amount if it already exist or add theitem if it doesn't
- Define function itemTotal(items, prices):
- givethe items prices and the display the total for all the itemson that list at the bottom.
Example of print out below
Item list 2 1 4 1 9 brush apple bread Total: toothpaste batteries New item list 3 brush 1 butter 10 apples 1 10 toothpaste batteries $30.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To define a function that displays a shopping list of random foods and items you can use the followi...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started