Concept explainers
Help! (In Python). Please dont use chatgpt
Sales Tax Calculator
Create a program that uses a separate module to calculate sales tax and total after-tax.
Example runtime. User input is italicized for the example. Allow the user to enter their own input:
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!
The sales tax should be 6% of the total amount.
In a module, save the sales tax rate. This module should additionally provide functions for calculating sales tax and total after-tax. The results of these functions should be rounded to a maximum of two decimal places.
In the main() method, store the code that receives input and shows output. When you think it will make the code easier to read and maintain, divide it into functions.
Allow the user to repeat this process as any time as they want.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- PYTHON!!! The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed. An example of the program input and output is shown below: Enter the puchase price: 200 (SEE IMAGE FOR PURCHASE PRICE CHART) Results you should get: Input: 200 Output: Purchase price: 200…arrow_forwardWarm-up: Integer Operations Write a program that asks the user to enter two integers and prints the Difference, Product, Area of an Ellipse, and Average of these numbers. Here is an example of the execution of the program:arrow_forwardQuestion 18 Guessing Game Code a solution for the following problem. Post your program in the textbox below. (NOTE: Indenting matters.) • Hard-code an integer variable valid value from 1 to 10. Ask the user to guess your whole number and input that number. - Then compare the user's input to your literal number ani tell the user how they compare, is it greater than, less than or equal to each other. Extra: Send an error message if the value entered is not between 1 and 10. Edit View Insert Format Tools Table Ev Ev To E v V O Paragraph v BIU A ev T? v 12pt varrow_forward
- Program Unit Score Calculator Console App Write a Python Console Application program that allows the user to enter the marks for different assessments in a unit, and computes the total mark and grade for the unit. Here is the program logic specification: There are six assessment activities Quiz1, Quiz2, Quiz3, Quiz4, Lab Journal, Major Assignment and Final Exam. The four quizzes are worth 5 marks each, the Lab Journal is worth 10 marks, the Major Assignment is worth 30 marks and the Final Exam is worth 40 marks. The algorithm for computing the total mark for the unit is: Total Mark = Quiz1+Quiz2+Quiz3+Quiz4+Major Assignment+ Lab Journal + Final Exam The following screenshot shows a successful test run:arrow_forwardPython please: If the score is between 90 and 100, the grade is A, and the teacher comment is 'Exceptional work' for 100 only 'Excellent work' for anything other than 100 If the score is between 80 and 89, the grade is B, and the teacher comment is 'Very Good, can do better' If the score is between 70 and 79, the grade is C, and the teacher comment is 'Good, but need to work harder' If the score is between 60 and 69, the grade is D, and there are no teacher comments. If the score is below 60, the grade is F, and the teacher comment is 'Fail, need to appear for a retest' For example if the input (student test score) is 100 the output is The Student grade is A and the teacher comment is 'Exceptional work'arrow_forwardI don't know how to write a pseudocode for this program: # Rebecca Oyewole Project 4 This program calculates a customer receipt# showing each item ordered, the quantity,the price per item, the# amount owed for each item, with a total at the end.def get_order():item = input()if not item:return '00'if item == 'Q':return 'QQ'quantity: int = int(input('How many? '))return item, quantityregister = 0order = ''prices = 50, 60, 70, 75, 90print('Welcome to the Lemonade Truck...')print('Ready to take orders!')while 1:print('What would you like to order? (1-3)? One at a time, please.')print('1. Glass of lemonade - $0.50\n''2. Glass of orange juice - $0.60\n''3. Glass of grapefruit juice - $0.70\n''4. Glass of mango juice - $0.75\n''5. Glass of water - $0.90')item, quantity = get_order()if item == 'Q':breakif item == '0':quantities = list(order.count(obj) for obj in '123')for name, quantity in zip(('Glasses of lemonade', 'Glasses of orange juice','Glasses of grapefruit juice', 'Glasses of mango…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education