#helper functions def calculateTax(): #use the variables from main() to do a calculation grossPay = hoursWorked * hourlyRate percent = float(input("Input tax percentage as decimal eg 0.5 for 50%")) tax = grossPay * percent def displayTax(): #display the result of the calculation perfomed in calculateTax() print(f"Hours worked: {hoursWorked}") print(f"Hourly rate: {hourlyRate}") print(f"Tax: {tax}") def main(): print("Welcome to the tax calculator!") hoursWorked = int(input("Enter the number of hours worked: ")) hourlyRate = float(input("Enter the hourly rate: ")) calculateTax() displayTax() print("End of program!") #call the main function main()