Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Use only concepts found from chapters 1 - 5 in our book. The purpose of this project is to practice loops, specifically a while loop and a for loop. Make sure that you use both those concepts. Things...

1 answer below »
  1. Use only concepts found from chapters 1 - 5 in our book. The purpose of this project is to practice loops, specifically a while loop and a for loop. Make sure that you use both those concepts.

    Things you need to know (could be a constant in your program) - State grocery tax is 4.5%, Total Sales tax for Tulsa is 8.517%.

    Assumptions you can make: User can only buy one of each item and each item is unique. This should make things easier for you and allow you more choice on what data type to use to store the items.

    Allow your user to enter items and prices for a grocery store shopping list (this will be a while loop with sentinel value). You can use any sequence type variable from week 3 to store the items.

    When the user indicates they are done entering items print the shopping list with calculations for tax (both with and without the state's tax). You would use a for loop for this part.

    Example Output (please be creative this is just an example you could format better than this, the math is not exact just an example).

    Welcome to the grocery shopping list calculator with tax comparisons. Enters Items and price, enter Q to quit.

    Please Enter an Item (type Q to Quit and print the list):
    Bread 3.99
    Please Enter an Item (type Q to Quit and print the list):
    Cheese 2.79
    Please Enter an Item (type Q to Quit and print the list):
    Eggs 1.99
    Please Enter an Item (type Q to Quit and print the list):
    Q

    Here is your Shopping List:
    Bread $3.99
    Cheese $2.79
    Eggs $1.99
    subtotal $8.77
    full tax $0.75
    tax without state $0.37
    Total Full Tax $9.52
    Total without state tax $9.14


Please have it done on Visual Code Studio
Answered Same Day Apr 25, 2022

Solution

Vaibhav answered on Apr 26 2022
101 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here