I have a question??

phil hunt philh at invalid.email.address
Tue Nov 11 22:33:50 EST 2003


On Tue, 11 Nov 2003 07:06:26 -0500, Ryan Silverwood <ryans at mad.scientist.com> wrote:
>I want to write a python program which will calculate a person's net annual income after tax, given the following rules:
>*The first 1500 is tax free
>*any amount earned over £1500 and upto £35000 is taxed at 30%
>*and amount earned over £35000 is taxed at 45%

infinity = 999999
taxRates = [ [1500, 0], [35000-1500, 30], [infinity, 45] ]

def calcNetIncome(gross):
   if youAreAskingUsenetToDoYourHomework:
      taxRate = 100
   net = gross * (100-taxRate)/100
   return net

-- 
"It's easier to find people online who openly support the KKK than 
people who openly support the RIAA" -- comment on Wikipedia
(Email: <zen20000 at zen.co.ku>, but first subtract 275 and reverse 
the last two letters).  






More information about the Python-list mailing list