in reply to Homework Problems

these are easy. The teacher has basically done the work for you.

You are assigning values to variables. Check the variables to see if they match a value. If they do call a subroutine and return the value.

That should get you on your way. To get more help, you will need to post some code.

Remember to use strict and warnings; they will help you out