Symmetric Numbers

0

write a function to tell if a number is symmetric or not. for example:

input: 151 output: True

input: 142 output: False

and so on: 1111 True, 2390 False, 1226221 True

Whalalalalalala CHen

Posted 2018-08-07T14:22:29.740

Reputation: 337

Question was closed 2018-08-07T14:28:52.507

My question is not a duplicate, your's involve matrix and mine is different – Whalalalalalala CHen – 2018-08-07T14:35:25.450

2Your question is largely the same; the older question asks "is it a palindrome in base X" whereas yours asks "is it a palindrome in base 10", so answers to the duplicate question would automatically be competitive here, with very little modification. – Giuseppe – 2018-08-07T14:38:58.820

1The challenge this was marked as a duplicate of only requires to convert the input to another base. This is just a special case with base $10$. By convention, when trivial modifications can be made to port the majority of answers from one challenge to the other while they are still competitive, marking one challenge as a duplicate of the other is recommended. – Mr. Xcoder – 2018-08-07T14:39:31.820

5

Either way, welcome to Programming Puzzles & Code Golf! Don't let the fact that your first challenge was marked as a dupe discourage you from posting in the future! In fact, to avoid such situations we have a Sandbox, where you can show your challenge to others prior to posting on the main site to receive feedback.

– Mr. Xcoder – 2018-08-07T14:43:42.753

Answers

0

Python 2, 23 bytes

lambda n:`n`==`n`[::-1]

Try it online!

TFeld

Posted 2018-08-07T14:22:29.740

Reputation: 19 246