First off, you should always make some attempt and include it in your post before asking a question. Second, you should be asking a more specific question. And finally, if those weren't true in general, they're definitely true when you're doing homework.
Due to the reasons discussed here
we will be moving to python-forum.io
on October 1, 2016.
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.