def stateTax(amount):
taxRate = 0.05
taxAmount = taxRate * amount
print('State tax: ',taxAmount)
return taxAmount
def countyTax(amount):
taxRate = 0.025
taxAmount = taxRate * amount
print('County tax: ',taxAmount)
return taxAmount
def totalTax(state,county):
taxAmount = state + county
print('Total tax: ',taxAmount)
return taxAmount
def totalAmount(amount, tax):
total = amount + tax
return total
def main():
amount = float(input('Enter the amount of purchase: '))
sTax = stateTax(amount)
cTax = countyTax(amount)
tTax = totalTax(sTax,cTax)
print('Total amount including tax is: ' ,total)
main()
I am a student using python programing.
My goal is to
1. Enter purchase amount
2. Compute State tax
3. Compute County tax
4. Display purchase amount
5. Display state tax
6. Display county tax
7. Display total sales tax
8. Display Total of Sale
How can I fix my line 26 to define total from error saying totalis not defined?