Question: Please help me with this task. Thanks. The task is broken down into three sections. Section 1 User Input Section 2 loop through the grocery

 Please help me with this task. Thanks. The task is broken

down into three sections. Section 1 User Input Section 2 loop through

the grocery list Section 3 - provide output to the console *Task:

Please help me with this task. Thanks.

The task is broken down into three sections. Section 1 User Input Section 2 loop through the grocery list Section 3 - provide output to the console *Task: Create the empty data structure grocery-item = ? grocery nistory *Variable used to check if the while loop condition is met stop E while ?2??? *Accept input of the name of the groce ry item purchased. *Accept input of the quantity of the grocery item purchased. #Accept input of the cost of the grocery item input (this is a per-item cost). sUsing the update function to create a dictionary entry which contains the name, number an *Add the grocery-item to the grocery-history List using the append function *Accept input from the user asking if they have finished entering grocery items. * Define variable to hold grand total called grand_total *Define a for' Loop for 222?? in 222222227: *Calculate the total cost for the grocery_item. *Add the item-total to the grand-total *Output the information for the grocery item to match this example: #2 apple @s1.49 ea $2.98 Test Your Code nilk 2.99 Single Grocery Item Check Check l! SHOW DIFF LAST RUN on 2/7/2019 43:23 PM Check 1 failed Output: inter item_nane: Enter quantity Purchased: Ente ype .C' for continue or ,q, to quit: raceback (most recent call last): File "grocery list.py", ine 40, in cmodule> item total -grocery iteml'number] groce ypeError: can't multiply sequence by non-int Expected: Item nane: Quantity purchased: Price per iten: ould you like to enter another item? Type "c for continue or q to quit: 1 milk $2.99 ea $2.99 Grand total: $2.99 Test Your Code 99s 3.99 onions 8.79 Multiple Grocery Check Check I! SHOW DIFF LAST RUN on 2/72019 84323 PM Check 1 failed Output: Enter item nane: Enter quantity Purchased: Ente Type C for continue or q to quit: Enter iter Type C for continue or q to quit: Enter Iter Type C for continue or q to quit: Traceback (most recent call last) File "grocery list.py", line 48, in cmodule Iten total -grocery_iteml number'] groce TypeError: can't multiply sequence by non-Int Expected Item nane: Quantity purchased Price per tem Would you like to enter another Item Type for continue or 'q to quit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!