Question
I need help writing the pseudocode for the following python program: # define the sum of the items def getSum(item1, item2, item3, item4, item5): return
I need help writing the pseudocode for the following python program:
# define the sum of the items def getSum(item1, item2, item3, item4, item5): return item1 + item2 + item3 + item4 + item5 # returning the calculation
def getTotalTax(subTotal): # define total tax return subTotal * .06 # returning the calculation for total tax
def getTotalAmount(subTotal, totalTax): # define total amount return subTotal + totalTax # return the calculation for total amount
# define the main module def main(): # Enter price for Item1 item1 = float(input('Enter the price for item1: '))
# Enter price for Item2 item2 = float(input('Enter the price for item2: '))
# Enter price for Item3 item3 = float(input('Enter the price for item3: '))
# Enter price for Item4 item4 = float(input('Enter the price for item4: '))
# Enter price for Item5 item5 = float(input('Enter the price for item5: '))
print() # blank line
# Calculate the total owed before tax subTotal = getSum(item1, item2, item3, item4, item5) print('The subtotal of the items is: ', subTotal) # display subtotal
# Calculate the total tax amount owed totalTax = getTotalTax(subTotal) print('The total tax owed is: ', totalTax) # display total tax owed
# Calculate the total amount owed totalAmount = getTotalAmount(subTotal, totalTax) print('The total amount owed is: ', totalAmount) # display total amt
main() # call module
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started