Bryce H.

asked • 01/22/23

How to code in python something that will take your inputs of items bought and add them with tax

Calculates the total including sales tax (8.875%) of a shopping trip.

Create a total variable and a tax variable. Total the items calculated with tax. Be sure to test if the price is above zero.

Continues to prompt the user to enter prices until they are done. Hint: enter a while loop until the user types ‘done’ at the prompt.

Hint: Since we don't know how many times the loop will execute, it makes the most sense to use a 'while' loop. You will need to prompt the user in 2 different places. Once outside of the loop and again as the last line inside the while loop.


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.