# hw1.py
# Kristina Fedorenko
# 111c-aq
#
# This program computes taxes for 2009
# based on user's salary and deductions. This information is
# entered by the user.
#
# To calculate the federal taxes the program
# uses the following formula: (salary - deductions) x 28%
#
# The state taxes are computed using this formula:
# (salary - deductions - 1000) x 5%
#
#
def main ():
# *^*^*^*^*^ask user to provide all the information needed*^*^*^*^*^
print ' '
print 'Welcome!'
print ' '
print 'This program will compute your taxes for 2009.'
print ' '
print 'You will be asked to enter some information. Please do NOT include'
print '$ symbols or commas in your answers.'
print ' '
first = raw_input('Please enter your first name: ')
last = raw_input('Please enter your last name: ')
salary = input('Please enter your salary for 2009: ')
deductions = input('Please enter your deductions: ')
# *^*^*^*^*^calculate federal and state taxes*^*^*^*^*^
federal = (salary - deductions)*0.28
state = (salary - deductions -1000 )*0.05
total = state + federal
# *^*^*^*^*^show results to user*^*^*^*^*^
print ' '
print 'Dear', first, last+':'
print ' '
print 'Your federal taxes for 2009 are:','$', federal
print ' '
print 'Your state taxes for 2009 are: ','$', state
print ' '
print 'You will have to pay a total of', '$', total, 'in taxes.'
print ' '
print 'Thanks for using this program!'
print ' '
main ()