Answered step by step
Verified Expert Solution
Link Copied!

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 0 TO END)
Cost of item: 35.99
Cost of item: 27.50
Cost of item: 19.59
Cost of item: 0
Total: 83.08
Sales tax: 4.98
Total after tax: 88.06
Again? (y/n): y
ENTER ITEMS (ENTER 0 TO END)
Cost of item: 152.50
Cost of item: 59.80
Cost of item: 0
Total: 212.3
Sales tax: 12.74
Total after tax: 225.04
Again? (y/n): n
Thanks, bye!
Specifications
The sales tax rate should be 6% 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

You neglected to sign the enclosed contract.

Answered: 1 week ago