Did you notice, that this is a palindrome?
Input
Non-negative integer number or string representing it
Output
4 possible outputs, representing two properties of number:
- is it palindrome
- tricky #2
Tricky #2 property
If number is not palindrome, this property answers the question "Do the first and the last digits have the same parity?"
If number is palindrome, this property answers the question "Do the first and middle digit have the same parity?". For even lengths, the middle digit is one of the center two digits.
Examples
12345678 -> False False
It is not palindrome, first and last digits have different parity12345679 -> False True
It is not palindrome, first and last digits have same parity12344321 -> True False
It is palindrome, the first digit 1 and middle digit 4 have different parity123454321 -> True True
It is palindrome, the first digit 1 and middle digit 5 have same parity
P.S.
You are up to decide output type and format. It could be any 4 distinct values. Just mention it in your answer.