Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help writing the pseudocode for the following python program: def getSum(item1, item2, item3, item4, item5): return item1 + item2 + item3 + item4
I need help writing the pseudocode for the following python program:
def getSum(item1, item2, item3, item4, item5): return item1 + item2 + item3 + item4 + item5 def getTotalTax(subtotal): return subTotal * .06 def getTotalAmount(subTotal, totalTax): return subTotal + totalTax 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() # Calculate the total owed before tax subTotal = getSum(item1,item2,item3,item4,item5) print('The subtotal of the items is: ', subTotal) # Calculate the total tax amount owed totalTax = getTotalTax(subTotal) print('The total tax owed is: ', totalTax) # Calculate the total amount owed totalAmount = getTotalAmount(subTotal, totalTax) print('The total amount owed is: ', totalAmount) main()
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