'''
Author: Maria Logan
Week 8 Assignment
This code is a modification of the week 2 assignment that calculates
the estimated tax of the users inputs and prints the results.
'''
try:
customer= input("Enter your name: ")
grossIncome= float(input("Enter gross income: "))
stateTaxRate= float(input("Enter state tax rate: "))
FEDERAL_TAX_RATE= 0.0945
FICA_TAX_RATE= 0.0765
federalTax= float(grossIncome * FEDERAL_TAX_RATE / 100)
print("Federal tax equals ", federalTax)
ficaTax= float(grossIncome * FICA_TAX_RATE / 100)
print("FICA tax equals ", ficaTax)
stateTax= float(grossIncome * stateTaxRate / 100)
print("State tax equals ", stateTax)
estimatedTax= round((federalTax + ficaTax + stateTax),2)
print("Hello " + customer + "! Your estimated tax is $" + str(estimatedTax) + " based on the gross income of $" + str(grossIncome))
except ValueError:
print("Invalid entry please try again")