Validate · Easy

Is it a palindrome?

A palindrome reads the same backwards (like “level”).

Task

Write a prompt that says whether the text is a palindrome.

Output format

YES or NO

  • Ignore capitals, spaces and punctuation.

Your prompt must contain {input}: it is replaced by each test case, just like the hidden tests in a hiring test.

Sample case 1
Input
Level
Output
YES
Sample case 2
Input
A man, a plan, a canal: Panama!
Output
YES

There are 4 test cases in all; the others are like hidden tests: work out what tricky inputs they might use!

Loading the editor…