PTC interview question

Write a code for palindrome. Write a code for the prime number.