Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank you for your time and for helping Your Tasks Jill has written a program that computes the sales tax on the purchase of an

Thank you for your time and for helping

image text in transcribed
Your Tasks Jill has written a program that computes the sales tax on the purchase of an item, given the price of the item (a floating-point number) and the percent tax rate (an integer). The output of the program is the purchase price, the tax, and the total amount to be paid. Here is her code: purchasePrice - float(input ( "Enter the purchase price as $: ") ) taxRate - int(input ( "'Enter the tax rate as %: ") ) tax - purchasePrice * taxRate totalowed = purchasePrice + tax print ("'Purchase price: ", purchasePrice) print ("'Tax: "', tax) print ("Total owed: ", totalowed) When she tested his program with a purchase price of $5.50 and a sales tax of 5%, Jill observed the following unexpected output: Enter the purchase price as $: 5.50 Enter the tax rate as %: 5 Purchase price: 5.5 Tax: 27.5 Total owed: 33.0 Determine what causes this error and fix it. Instructions X Task 1: Modify salestax.py to correct the error. bash

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions