Create a flowchart that describes the following algorithm and then write Python code to implement the algorithm. Write the Python code in a Python program file, NOT in the IDLE window. Include in your HW PDF document a photo of your flowchart and a screenshot of your program code. Also include in your HW PDF a screenshot of the output that appears in the IDLE window.

Respuesta :

Answer:

Python code is as follows:

********************************************************************************

#function to get number up to any number of decimal places

def toFixed(value, digits):

return "%.*f" % (digits, value)

print("Enter the price: ", end='', flush=True) #prompt for the input of price

price = float(input()) #taken input

totalCost = price + 0.05 * price #calculating cost

print("Total Cost after the sales tax of 5% is applied: " + toFixed(totalCost,2)) #print and output totalCost

************************************************************************************

Ver imagen ofentsemaphalla
Ver imagen ofentsemaphalla
Ver imagen ofentsemaphalla
Ver imagen ofentsemaphalla