#!/usr/bin/ksh
echo "Enter a q and hit enter:"
read INPUT
if [[ "${INPUT}" == "q" ]]; then
echo "You made it!"
exit 0
else
echo "Close but not correct."
exit 1
fi
Sometimes it comes more handy to use case/esac.
Start reading the links I posted so you can have a start and ask if you get stuck.
Just in case: Homework or Classroom stuff may only be posted in the special subforum for it. Check the The UNIX and Linux Forums - Forum Rules to see what I mean