PTC Interview Question

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