IBM Interview Question

Q: Write a code to check whether the word is a palindrome.