What you have to do is this:
1.) Read your sentences into a string. (hint use explode based on a ".", "?" or "!")
2.) "Explode the first word off and treat it as a single variable, (hint you can then make it's first letter capitalized)
3.) Take the remaining part of the sentence and use lower command.
4.) Piece the string back together.
5.) Repeat for each sentence.
I'm not going to give you the code as it's all in the manual, plus you learn better by doing it rather then copying it. Just think it through and refer to the manual for each action you need accomplished. Not a difficult task. 🙂