Program 1: Price Calculator.py Write a program for your store that uses a while loop to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Program 1: Price Calculator.py Write a program for your store that uses a while loop to accumulate item prices multiplied by number of items that will be input by the user. The program will then calculate the tax amount, and then display the subtotal, tax amount, and total due. Program requirements: The program must display a unique welcome message that includes your store's name. The program must use accumulation in a while loop to calculate the subtotal. The loop will repeat until 0 (zero) is entered for item price. In the loop body, prompt for price and number of items at that price. Multiple the price and number of items, then add the result to the subtotal. Tax must be calculated using a tax rate of 8.25%. To determine tax amount, multiply the tax rate by the subtotal. Add the tax amount to the subtotal to determine the total due. Displayed values that represent dollar amounts must be formatted as currency, including a dollar sign and 2 decimal places ● Sample run and output below: Welcome to Dollar Family! Enter item price: 10.15 How many of item: 1 Enter item price: 0 Subtotal: $10.15 Tax: $0.84 Total $10.99 >>> | Welcome to Dollar Family! Enter item price: 12.99 How many of item: 2 Enter item price: 7.00 How many of item: 1 Enter item price: 0 Subtotal: $32.98 Tax: $2.72 Total $35.70 Program 1: Price Calculator.py Write a program for your store that uses a while loop to accumulate item prices multiplied by number of items that will be input by the user. The program will then calculate the tax amount, and then display the subtotal, tax amount, and total due. Program requirements: The program must display a unique welcome message that includes your store's name. The program must use accumulation in a while loop to calculate the subtotal. The loop will repeat until 0 (zero) is entered for item price. In the loop body, prompt for price and number of items at that price. Multiple the price and number of items, then add the result to the subtotal. Tax must be calculated using a tax rate of 8.25%. To determine tax amount, multiply the tax rate by the subtotal. Add the tax amount to the subtotal to determine the total due. Displayed values that represent dollar amounts must be formatted as currency, including a dollar sign and 2 decimal places ● Sample run and output below: Welcome to Dollar Family! Enter item price: 10.15 How many of item: 1 Enter item price: 0 Subtotal: $10.15 Tax: $0.84 Total $10.99 >>> | Welcome to Dollar Family! Enter item price: 12.99 How many of item: 2 Enter item price: 7.00 How many of item: 1 Enter item price: 0 Subtotal: $32.98 Tax: $2.72 Total $35.70
Expert Answer:
Related Book For
Calculus Early Transcendentals
ISBN: 978-0321947345
2nd edition
Authors: William L. Briggs, Lyle Cochran, Bernard Gillett
Posted Date:
Students also viewed these programming questions
-
The function D(p) gives the number of items that will be demanded when the price is p. The production cost C(x) is the cost of producing x items. To determine the cost of production when the price is...
-
Write a program for your graphing utility that graphs two vectors and their difference given the vectors in component form.
-
Write a proposal for your research report. This document will define the problem, explain the scenario, identify the audience, and outline the plan to complete the project. It will be written as a...
-
Use normal job-order costing to calculate the balance in the ending Work-in-Process account and the Cost of Goods Sold account on 31 December 20X3 after any necessary adjustment(s). Sweet Memories...
-
What is LIBOR? How does it compare to the U.S. prime rate?
-
Consider the following partially completed income statement performance report for Gaje, Inc. Requirement 1. Complete the flexible budget variance analysis by filling in the blanks in the partial...
-
Daphne Brown-Wright worked as a teacher for East St. Louis School District 189 from 1975 until 1998 and then returned as an administrator from 2002 until 2012, thus serving the District for 33...
-
On January 3, 2012, Trusty Delivery Service purchased a truck at a cost of $90,000. Before placing the truck in service, Trusty spent $3,000 painting it, $1,500 replacing tires, and $4,500...
-
Which data model provides a user with the best "program-data independence"? A. Hierarchial Model B. Network Model C. Relational Model D. Entity Relationship Model Why?
-
Amfac Company manufactures a single product. The company keeps careful records of manufacturing activities from which the following information has been extracted: The companys manufacturing overhead...
-
1. Assume we have a training set and a test set as follows: Training set Index y Test set I Index I y 1 5.86 0.74 1 5.80 0.93 2 1.34 1.18 2 0.57 1.87 3 3.65 0.51 3 4.30 -0.06 4 4.69 -0.48 4 6.55 1.60...
-
I have three questions i would like to know about embedded systems. How is non-volatile memory different in an embedded system and a desktop system? What are the differences between embedded systems...
-
Define and explain Say's Law Define and explain Keynes' Law Define Aggregate Supply and, using the AS Curve, explain the relationship between Price and Real GDP. Describe different factors that...
-
The following information has been extracted from the financial statements of a company. Net income in 2 0 1 6 = $ 3 , 0 0 0 Annual depreciation in 2 0 1 6 = $ 1 , 0 0 0 Net operating working...
-
Which memory storage is widely used in PCs and Embedded Systems? 2. How is the protection and security for an embedded system made? 3. Which of the following task swapping method is a better choice...
-
Throughout most of human history, population growth has been slow, limited by the amount of food available. As late as 1800, the entire population of the earth was less than one billion. Only in the...
-
The plot above is created with the parametric equations [x(t) = a cos(bt) y(t) = c sin(dt) To acheive this graph, a = b= C= d = Hint: b and d are both whole numbers from 1 to 3
-
Banner Company acquires an 80% interest in Roller Company for $640,000 cash on January 1, 2013. The NCI has a fair value of $160,000. Any excess of cost over book value is attributed to goodwill. To...
-
If the power series f(x) = c k x k has an interval of convergence of |x| < R, what is the interval of convergence of the power series for f(ax), where a 0 is a real number?
-
Use a change of variables to find the following indefinite integrals. Check your work by differentiating. dx VI - .2 /1 9x
-
a. Find the first four nonzero terms of the Taylor series for the given function centered at a. b. Write the power series using summation notation. f(x) = 10 x , a = 2
-
Go to the PMI Web site and examine the link Membership. What do you discover when you begin navigating among the various chapters and cooperative organizations associated with the PMI? How does this...
-
Go to http://www.pmi.org/business-solutions/casestudies and examine some of the cases included on the Web page. What do they suggest about the challenges of managing projects successfully? The...
-
Using your favorite search engine (Google, Yahoo!, etc.), type in the keywords project and project management. Randomly select three of the links that come up on the screen. Summarize what you find.
Study smarter with the SolutionInn App