I have a question??

Bruno Desthuilliers bdesth.nospam at removeme.free.fr
Tue Nov 11 09:38:07 EST 2003


Ryan Silverwood 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%
> 
> 
> if anyone could help it would be much appreciated

1/ Do it on paper,
2/ analyse how you did it,
3/ try to abstract the rules,
4/ write functions implementing those rules,
5/ write test testing the functions
6/ write a program using those functions,

and you're done.

You may eventually swap 4 and 5 (write the tests first)

If you get stuck anywhere between 4 and 6, or want some review, 
criticism, advices about your code, feel free to post here with the 
relevant code.

> thanx
You're welcome

Bruno





More information about the Python-list mailing list