+ 2

Challenge : convert the string into lowercase and check it is palindrome or not !!!

Example : ABCBA abcba abcba is palindrome any programming languages are welcome

23rd Nov 2017, 6:35 AM
Amar Dahake
7 Respostas
+ 12
#python a=input().lower() print(a+' is palindrom.' if a==a[::-1] else a+' is not palindrom.')
23rd Nov 2017, 8:12 AM
Käzî Mrîdùl Høssäîn
Käzî Mrîdùl Høssäîn - avatar
+ 8
my code ignores uppercase and spaces and punctuation. https://code.sololearn.com/WpbOkxJE38uu/?ref=app
2nd Dec 2017, 2:31 AM
Logan
Logan - avatar
+ 3
This is Python, using recursion: def palChecker(s): def lowerS(s): s = s.lower() res = '' for i in s: if i in 'abcdefghijk\ lmnopqrstu\ vwxyz': res = res + i return res def isPal(s): if len(s) <= 1: return True res = (s[0] == s[-1]) and \ isPal(s[1:-1]) return res return isPal(lowerS(s))
23rd Nov 2017, 7:14 AM
Talley Berry
Talley Berry - avatar
23rd Nov 2017, 7:06 AM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
+ 1
Not sure if it's exactly the same, but that's the basic implementation I learned from a John Guttag book, by the way.
23rd Nov 2017, 7:17 AM
Talley Berry
Talley Berry - avatar
+ 1
My attempt to this specific challenge. Take a look :) Explanations inside the code https://code.sololearn.com/cIv01PihW4aq/?ref=app Here are other 2 Palindrome Checkers I made to other challenges :) https://code.sololearn.com/c8OLa6oPvk6V/?ref=app https://code.sololearn.com/cKX1twtIeLb0/?ref=app
9th Dec 2017, 12:54 AM
Jonathan Álex
Jonathan Álex - avatar
+ 1
My other solution to this challenge, now using Python https://code.sololearn.com/c1i11OZmzrl1/?ref=app
9th Dec 2017, 12:03 PM
Jonathan Álex
Jonathan Álex - avatar