I would say do your own homework. At least try first and show us what you've tried. Don't rely on us to write your code for you.
And if someone decided to give you wrong answers, would you realize that or would you turn in the bad answers?
A)answer for Q.2