Your other post got deleted> Read this: http://forum.arduino.cc/index.php?topic=97455.0
And we will not just "ammend" your code to do your assignment for you.
You need to ask a specific question like:
"How do I tell whether a value is between two limits? I tried this...and it does not work."
Where the ... is the code you used in an attempt at solving the problem.
you need an if () statement.