Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program that uses a separate module to calculate sales tax and total after tax. Console Sales Tax Calculator ENTER ITEMS ( ENTER 0
Create a program that uses a separate module to calculate sales tax and total after tax.
Console
Sales Tax Calculator
ENTER ITEMS ENTER TO END
Cost of item:
Cost of item:
Cost of item:
Cost of item:
Total:
Sales tax:
Total after tax:
Again? yn: y
ENTER ITEMS ENTER TO END
Cost of item:
Cost of item:
Cost of item:
Total:
Sales tax:
Total after tax:
Again? yn: n
Thanks, bye!
Specifications
The sales tax rate should be of the total.
Store the sales tax rate in a module. This module should also contain functions that calculate the
sales tax and the total after tax. These functions should round the results to a maximum of two
decimal places.
Store the code that gets input and displays output in the main function. Divide this code into
functions whenever you think it would make that code easier to read and maintain.
Assume the user will enter valid data
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started