Question: Simple Shopping Cart Write a program in python which, when run, asks a person for the quantity of oranges, apples, and bananas. It will then

Simple Shopping Cart

Write a program in python which, when run, asks a person for the quantity of oranges, apples, and bananas. It will then print out the quantities, a subtotal, a tax, and a total. The prices are fixed (apples - $1, oranges - $2, bananas - $3) and the tax is 10%.

An example interaction is shown below. The bold is where the user entered input and will not appear in your work.

Welcome to the Fruit Shop!

Please enter number of oranges: 3

Please enter number of apples: 2

Please enter number of bananas: 0

You ordered the following:
3 oranges at $1 each for a line total of $3.00

2 apples at $2 each for a line total of $4.00

0 bananas for $3 each for a line total of $0.00

Your subtotal is $7.00

Your tax is $0.70

Your order total is $7.70

For full credit, pay attention to variable datatypes and how items are displayed. Note that you will have to research how to format numbers to two decimal places. There are multiple ways to do this, please make sure you are using one of the Python3 methods.


Step by Step Solution

3.58 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

printWelcome to the Fruit Shop numoranges intinputPlease numapples intin... View full answer

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 Economics Questions!