Write function isPalindrome that checks if a given string (case insensitive) is a palindrome.

```racket
In Racket, the function is called palindrome?

(palindrome? "nope") ; returns #f
(palindrome? "Yay")  ; returns #t
```

Difficulty: introductory

Starter code:

def is_palindrome(s):
	

Solutions:
def is_palindrome(s):
    s = s.lower()
    return s == s[::-1]

def is_palindrome(s):
    """return True if word "s" is a palindrome"""
    return s.lower() == s[::-1].lower()


def is_palindrome(s):
    s = s.lower()
    return s[::-1] == s


def is_palindrome(string):
    return string.lower() == string[::-1].lower()


def is_palindrome(s):
    s = s.casefold()
    return s == s[::-1]


def is_palindrome(s):
    
    p1=0 #Pointer 1 starts beginning of string
    p2=len(s)-1 #Pointer 2 starts at end of string
    
    while p1<p2: #While the first pointer is less than the second
        
        #Compares the values of first and last characters in string
        if s[p1].lower()==s[p2].lower():  
            p1+=1 #Increases position of pointer 1 
            p2-=1 #Decreases position of pointer 2
            continue
        
        else: #Returns false if the values do not match
            return False
    
    return True #If while loop is broken, returns true


def is_palindrome(s):
    s=s.lower() #making all characters lowercase 
    _list = list(s) #saving the text from the string s in a list
    _list.reverse(); #reversing the list
    str = "" #declaring some string variable
    for i in _list:
        str+=i #adding every item in our list in the string variable
    return str==s #comaparing the origianl string ot the reverset string
                  #this will automaticly return true or false


def is_palindrome(s):
    word = s.lower()   
    l_for = []
    i = 0
    
    for char in s:
        l_for.append(word[i])
        i += 1
        
    l_back = []
    j = -1
    
    for char in s:
        l_back.append(word[j])
        j -= 1
   
    if l_for == l_back:
        return True
    else:
        return False
      
      
is_palindrome('aba')

is_palindrome=lambda x:x.lower()==x[::-1].lower()

def is_palindrome(s):
    s = s.upper()
    rev = "".join(x for x in s[::-1])
    return rev == s

def is_palindrome(s):
    return s.lower()==s[::-1].lower()  #I solved this Kata on  8/17/2019  01:06 PM...#Hussam'sCodingDiary


def is_palindrome(s):
    for i in range(len(s)):
        if s[i].upper() != s[len(s) - 1 -i].upper():
            return False
    return True


def is_palindrome(s):
    return s.lower()==s[::-1].lower()


def is_palindrome(s):
    return s.lower() == s.lower()[::-1]


def is_palindrome(s):
    s = s.lower()
    return True if list(s) == list(s)[::-1] else False


def is_palindrome(s):
    # `s` contains only [a-z] and [A-Z]!

    i = 0
    j = len(s) - 1
    
    while i < j:
        if ord(s[i]) ^ ord(s[j]) | 32 != 32:
            return False
        i += 1
        j -= 1
    
    return True

is_palindrome=lambda s:(lambda _:_==_[::-1])(s.lower())


from math import floor, ceil

def is_palindrome(s: str) -> bool:
    """ Check if a given string (case insensitive) is a palindrome. """
    s = s.lower()
    if not len(s) % 2:
        return s[:floor(len(s) / 2)] == s[floor(len(s) / 2):][::-1]
    else:
        return s[:floor(len(s) / 2)] == s[ceil(len(s) / 2):][::-1]

def is_palindrome(s):
    for i in range(len(s)//2):
        if s[i].lower() != s[-i-1].lower():
            return False
        else:
            pass
    return True

def is_palindrome(s):
    return False if sum([1 for i in range(len(s)) if s[i].lower() != s[len(s) - 1 - i].lower() ]) else True


def is_palindrome(s):
    s_low = s.lower()
    if len(s) == 1:
        return True
    elif len(s) % 2 == 0:
        half = int(len(s) / 2)
        word_part_1 = s_low[:half]
        word_part_2 = s_low[half:][::-1]
        if word_part_1 == word_part_2:
            return True
        else:
            return False
    elif len(s) % 2 == 1:
        half2 = int(len(s) / 2)
        word_part_3 = s_low[:half2]
        word_part_4 = s_low[(half2 + 1):][::-1]
        if word_part_3 == word_part_4:
            return True
        else:
            return False


def is_palindrome(s):
    output=True
    s=s.upper()
    for i in range((len(s)//2)):
        if s[i]!=s[len(s)-1-i]:
            output=False
    return output


def is_palindrome(s):
    x = s[::-1].lower()
    if s.lower() == x:
        return True
    else:
        return False


def is_palindrome(s):
    s = s.lower()
    start = 0
    end = -1
    palindrome = True
    for x in range(int(len(s))):
        if s[start] == s[end]:
            start += 1
            end -= 1
        else: palindrome = False
    if palindrome is True: return True
    else: return False
        
    


def is_palindrome(s):
    s=s.lower()
    a=s[::-1]
    if a == s :
        return True
    if a !=s :
        return False

def is_palindrome(string):
    return all(s.lower() == e.lower() for s, e in zip(string, reversed(string)))


def is_palindrome(s):
    return True if s.lower() == "".join(reversed(s.lower())) else False


def is_palindrome(s):
    return True if s[::-1].casefold()==s.casefold()  else False


def is_palindrome(s):
    n = len(s)
    l = 0;
    r = n - 1;
    res = True
    s = s.lower()
    if(n == 0 or n == 1):
        return res
    else:
        while(l < r):
            if(s[l] != s[r]):
                res = False
                break
            l += 1
            r -= 1
        return res


def is_palindrome(s):
    for i in range(len(s)):
        if len(s) <= 1:
            print(s)
            return True
        elif s.lower()[0] != s.lower()[-1]:
            print(s)
            return False
        s = s[1:-1]
    return True    

def is_palindrome(s):
    return all(s.lower()[i] == s.lower()[len(s) - 1 - i] for i in range(len(s) // 2))


def is_palindrome(s):
    s = s.upper()
    for i in range(len(s)//2):
        if s[i] != s[-i-1]:
            return False
    return True

def is_palindrome(s):
    
    if(len(s)==0): return True
    if len(s) == 1:
        return True
    if len(s)==2:
        if str(s[0]).lower()==str(s[1]).lower():
            return True
    if s[0]!='' and s[-1]!='' :
        if str(s[0]).lower()==str(s[-1]).lower():    
            return is_palindrome(s[1:len(s)-1])
    
    return False


def is_palindrome(s):
    s = s.lower()
    sb = s[::-1]
    if s == sb:
        return True
    else:
        return False


def is_palindrome(s):
    return s.lower() == (''.join(s[::-1])).lower()


def is_palindrome(s):
    a = s.lower()
    b = "".join(reversed(a))
    if a == b:
        return True
    else:
        return False

def is_palindrome(s):
    s=s.lower()
    orden1=list(s)    
    orden2=(orden1[::-1])
    if orden1 == orden2:
        bool=True
    else:
        bool=False
    return (bool)


def is_palindrome( s ):
    s = s.lower()
    if len( s ) <= 1:
        return True
    elif s[ 0 ] != s[ -1 ]:
        return False
    return is_palindrome( s[ 1 : -1 ])


from math import ceil
from math import floor


def is_palindrome(s):
    return s[:(ceil(len(s) / 2))].lower() == s[(floor(len(s) / 2)):][::-1].lower()

import collections


def is_palindrome(s):
    deq = collections.deque([c for c in s.lower()])
    palFlag = True
    while len(deq) > 1:
        if deq.popleft() != deq.pop():
            return False
    return palFlag


def is_palindrome(s):
    return all(s[i].lower() == s[-1-i].lower() for i in range(len(s)))

def is_palindrome(s):
    List=list(s.lower())
    L=len(List)
    if L<=1:
        return True
    if List[0]==List[L-1]:
        del List[0]
        del List[L-2]
        return is_palindrome(''.join(List))
    else:
        return False


def is_palindrome(s):
    s=s.lower()
    s1="".join(reversed(s))
    if(s==s1):
        return True
    else:
        return False

def is_palindrome(s):
    # To consider upper and lowercase
    s = s.lower()
    rev = s[::-1]
    # Reversed string using splicing
    if s == rev:
        return True
    else:
        return False


def is_palindrome(s):
    x = s.lower()
    if x[::-1] == x:
        return True
    else:
        return False


def is_palindrome(s: str) -> bool:
    return s.lower() == s.lower()[::-1]


def is_palindrome(s):
    s = s.lower()
    if s[::-1] == s:
        return True 
    if s[::-1] != s:
        return False


def is_palindrome(s):
    return s.lower() == s.lower()[::-1]
    # returns True if the string reversed is similar to the original thus a palindrome
    # lower() is required to skip over uppercase letters


def is_palindrome(string):
    s=string.lower()    
    reversed_string = s[::-1]
    return s == reversed_string

def is_palindrome(s):
    s_lowered = s.lower()
    return s_lowered == s_lowered[::-1]


def is_palindrome(s):
    return not sum(1 for i in range(len(s)) if s.lower()[i] != s[::-1].lower()[i])


def is_palindrome(s):
    return s.lower()==''.join(list(reversed(s.lower())))



def is_palindrome(s):
    s_lower = s.lower()
    return s_lower == s_lower[::-1]


def is_palindrome(s):
    lol = s.lower()
    return lol == lol[::-1]


def is_palindrome(s):
    dni = 0
    ri = True
    for x in s:
        dni -= 1
        if x.lower() == s[dni].lower():
           ri = True
        else:
            ri = False
            break
    return ri



def is_palindrome(s):
    r = s[::-1]
    return r.lower() == s.lower()


def is_palindrome(s):
    s = s.lower()
    return s[:len(s)//2] == s[:len(s)-len(s)//2-1:-1]


def is_palindrome(s):
    
    l, r = 0, len(s)-1
    
    while l < r:
        if s[l].lower() != s[r].lower():
            return False
        l += 1; r -= 1
    return  True


def is_palindrome(s):
    s = s.lower()
    if len( s ) <= 1:
        return True
    if s[ 0 ] != s[ len( s ) - 1 ]:
        return False
    w = s.strip( s[ 0 ] )
    return is_palindrome( w )


def is_palindrome(s):
    s=s.lower()
    r=s[::-1]
    if s==r:
        return True
    else:
        return False


def is_palindrome(s):
    return (lambda str: str == str[::-1])(s.lower())


def is_palindrome(s):
    import math
    if len(s) == 1:
        return True
    if len(s) == 2:
        if s[0].lower() == s[1].lower():
            return True
    for i in range(0, math.floor((len(s) - 1)/2)):
        if s[i].lower() != s[len(s) - 1 - i].lower():
            return False
    return True



def is_palindrome(s):
    
    for i in range(len(s)//2):
        if s[i].lower() != s[-i-1].lower():
            return False
            break
    return True

def is_palindrome(s):
    s = s.upper()
    l = len(s)
    for i in range(l):
        if s[i] != s[l - 1 - i]:
            return False
    return True


def is_palindrome(a):
    s = a.lower()
    if s == s[::-1]:
        return True
    else:
        return False


def is_palindrome(s):
    s=s.lower()
    n=len(s)
    if n==1:return True
    n=n//2
    for i in range(1,n+1):
        if s[i-1] != s[-i]:
            return False
    return True

def is_palindrome(s):
    s = s.lower()
    if len(s) == 1:
        return True
    else:
        A = s[:len(s)//2]
        B = s[len(s)//2:]
        if len(B) > len(A):
            B=B[1:]
        if A == B[::-1]:
            return True
    return False


def is_palindrome(s):
    s = s.lower()
    return True if s == s[::-1] else False


print(is_palindrome('racasdecar'))
print(is_palindrome('racecaR'))

def is_palindrome(s):
    s=s.lower()
    if len(s) == 1 or len(s)==0:
        return True
    if s[0] == s[-1]:
        return is_palindrome(s[1:-1])
    return False

def is_palindrome(s):
    length_array = len(s) - 1

    for i in range(len(s) // 2):
        if s[i].lower() != s[length_array - i].lower():
            return False
    return True


def is_palindrome(s):
    reversedstring = ''.join(reversed(s))
    if s.lower() == reversedstring.lower():
        return True
    else:
        return False

def is_palindrome(str):
    s = str.lower()
    if len(s) <=1 :
        return True
    left = 0
    right = len(s)-1
    if s[left] ==   s[right] and  is_palindrome(s[left+1:right]):
     return True
    return False
    


def is_palindrome(s):
    iterations = len(s) // 2
    palindrome = True
    for i in range(iterations-1):
        a = s[i].lower()
        b = s[-(i + 1)].lower()
        if a != b:
            palindrome = False
            break    
    return palindrome


def is_palindrome(s):
    s = list(s)
    for i in range(0, len(s)):
        s[i] = s[i].lower()
    if s == s[::-1]:
        return True
    else:
        return False

def is_palindrome(s):
    return True if s.capitalize() == s[::-1].capitalize() else False


def is_palindrome(s):
    emptystring = ''
    x = s.lower()
    for eachletter in x:
        emptystring = eachletter + emptystring
    return emptystring == x


def is_palindrome(s):
    s=s.lower()
    s1=s[::-1]
    return s==s1


def is_palindrome(s):
    s = s.upper()
    return True if s == s[::-1] else False


def is_palindrome(s):
    s = s.lower()
    if len(s) == 1:
        return True
    if len(s) % 2 != 0:
        return (s[0:len(s) // 2 + 1] == s[:len(s) // 2 - 1:-1])
    else:
        return (s[:len(s) // 2] == s[:len(s) // 2 - 1:-1])


def is_palindrome(s):
    start = 0
    end = len(s) -1
    while start < end:
        if s[start].lower() == s[end].lower():
            start += 1
            end -= 1
        else:
            return False
    
    return True


def is_palindrome(s):
    s = s.lower() 
    return s[:] == s[-1::-1]


def is_palindrome(s):
    ns = s.lower()
    if len(ns) <= 1:
        return True
    if ns[0] != ns[-1]:
        return False
    return is_palindrome(ns[1:-1])

def is_palindrome(s):
    return s.casefold() == s.casefold()[::-1]


def is_palindrome(s):
    s = s.lower()
    if(len(s)<=1):
        return True
    midpoint = len(s)//2
    if(len(s)%2==1):
        return s[:midpoint] == s[midpoint+1:][::-1]
    return s[:midpoint] == s[midpoint:][::-1]


def is_palindrome(s):
    return s.upper() == ''.join(reversed(s.upper()))

def is_palindrome(s):
    s = s.casefold()
    s = list(s)
    if s == list(reversed(s)):
        return True
    else:
        return False

def is_palindrome(string):
    string = string.lower()
    if string == string[::-1] :
        return True
    else :
        return False

def is_palindrome(s):
    b = s.lower()
    if b != b[::-1]:
      return False
    else: 
      return True


def is_palindrome(s):
    s = s.upper()
    res = ''.join(i for i in s[::-1])
    return s == res

def is_palindrome(s):
    for i in range(len(s) // 2):
        if s[i].lower() != s[~i].lower():
            return False
    return True


def is_palindrome(s):
    if not s: return True
    s = s.lower()
    i = 0
    while i <= len(s)//2:
        if s[i] != s[-i-1]: return False
        i += 1
    return True


def is_palindrome(s):
    k = list(s.lower())
    for d, i in enumerate(k):
        if i != k[len(k)-(d+1)] :
            return False
    return True


def is_palindrome(s):
    l = len(s)
    if l == 1:
        return True
    for i in range(int(len(s)/2)):
        if s[i].lower() != s[l - i - 1].lower():
            return False
    return True


def inversa(s):
  large = 0
  sInversa = ""
  index = -1
  sLittle = ""
  for quantity in s:
    large += 1
  while large >= 1:
    sInversa += s[index]
    index -= 1
    large -= 1
  for letters in sInversa:
    if 65 <= ord(letters) <= 90:
        sLittle += chr(ord(letters)+32)
    else:
        sLittle += letters
  return sLittle
  
def is_palindrome(s):
    sPalindrome =""
    compare = inversa(s)
    for lettersPalindrome in s:
        if 65 <= ord(lettersPalindrome) <= 90:
            sPalindrome += chr(ord(lettersPalindrome)+32)
        else:
            sPalindrome += lettersPalindrome
    return compare == sPalindrome
            


def is_palindrome(sentence):
    return sentence.lower() == sentence[::-1].lower()


def is_palindrome(str):
  return str.lower() == ''.join(reversed(str.lower()))


def is_palindrome(s):
    return s[:].lower() == s[::-1].lower()


def is_palindrome(s):
    palindrome = False
    if len(s) <= 1:
        palindrome = True
    else:
        for i in range(len(s) // 2):
            if s[i].lower() == s[-i-1].lower():
                palindrome = True
            else:
                palindrome = False
                break
    return palindrome

def is_palindrome(s):
    return bool(s[::-1].lower() == s.lower())

def is_palindrome(str):
    a = str.lower()
    if a == a[::-1]:
        return True
    else:
        return False