Question: Write a program ( q 1 . py ) that produces a grocery store checkout receipt. Because we have not learned about loops yet we
Write a program qpy that produces a grocery store checkout receipt. Because we have not learned about loops yet we will limit ourselves to exactly items so imagine that your software is running on a checkout counter that says items only Prompt the user for items. The user will enter three things for each item separated by spaces.
Name of the item
Price per unit
Quantity
For example: input apples mean item name is apples price per unit is $lb and lb apples are purchased.
You must accept the user input and store it in a dictionary. The keys for the dictionary will be and and the value will be tuples. For example, the tuple for the item entered above is apples
Print the dictionary after all items are added. You should be able to do this by passing the constructed dictionary to the print function. Then print the receipt in the format shown below. You will need format control strings for this. You need to calculate the required totals. The field sizes are and
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
