The homework is fairly vague and doesn't ask for any type of error message when the input number is outside the appropriate range, and the p.code the teacher provided has a matlab error and not an error message that she programmed in. I think its supposed to be fairly elementary in nature. It definitely isn't a bad thing for me to start keeping that in mind, as I'm sure it will come up fairly frequently in the future.
Your answer is phenomenal, I really appreciate you taking to time to point out the errors in my thought process. That helps me considerably more than just providing the answer.
I was able to create a code that met all criteria for the assn and all input/output messages etc look identical.