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.99Please Enter an Item (type Q to Quit and print the list):Cheese 2.79Please Enter an Item (type Q to Quit and print the list):Eggs 1.99Please Enter an Item (type Q to Quit and print the list):Q
Here is your Shopping List:Bread $3.99Cheese $2.79Eggs $1.99subtotal $8.77full tax $0.75tax without state $0.37Total Full Tax $9.52Total without state tax $9.14
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here