Apparently, my last email message on this subject, instead of being
helpful, ended up being confusing.  The statement on the Assignment
Sheet was pretty clear, and I should have simply left it alone.

   The user will type E or D. A real world program should also detect 
   any other character typed and respond with "You entered an Illegal 
   Character, please try again." We will assume in this assignment 
   that the user can type a capital E or D correctly.

So, then, please do not worry about detecting other characters.
Your program can assume that the user is capable of typing an E
or a D, and will do correctly every time.  Our grading scripts
will not introduce spurious characters in response to your prompt.

Good luck in completing the assignment.

Yale Patt