I wondered why this has been asked many many times in the last few days both here and on python-forum. At least you are honest enough to admit that it is homework. You should be able to find this asked and answered many times already. If you do want help, you'll have to make an effort and post some code to be critiqued.
PoovenM commented: Thank you for the tip :) +2