A sample question for labtest 1

Phase 1

Present the user with the following prompt.

  Enter a word:
The entry has to be made on the same line as the prompt.

Here is a sample run:

  Enter a word: before

Phase 2

Adjust your program in such a way that the user is reprompted until a word consisting only of letters is entered.

Here is a sample run:

  Enter a word: b4
  Enter a word: before
Phase 3

Expand your program so that it reports if the entered word is a palindrome, that is, it reads the same backwards as forwards.

Here are two sample runs:

  Enter a word: b4
  Enter a word: before
  The word before is not a palindrome
and
  Enter a word: civic
  The word civic is a palindrome