title: Check if a number is odd or even in Python
body: <p>I'm trying to make a program which checks if a word is a palindrome and I've gotten so far and it works with words that have an even amount of numbers. I know how to make it do something if the amount of letters is odd but I just don't know how to find out if a number is odd. Is there any simple way to find if a number is odd or even?</p>
  <p>Just for reference, this is my code:</p>
  <pre><code>a = 0
  
  while a == 0:
      print(&quot;\n \n&quot; * 100)
      print(&quot;Please enter a word to check if it is a palindrome: &quot;)
      word = input(&quot;?: &quot;)
  
      wordLength = int(len(word))
      finalWordLength = int(wordLength / 2)
      firstHalf = word[:finalWordLength]
      secondHalf = word[finalWordLength + 1:]
      secondHalf = secondHalf[::-1]
      print(firstHalf)
      print(secondHalf)
  
      if firstHalf == secondHalf:
          print(&quot;This is a palindrom&quot;)
      else:
          print(&quot;This is not a palindrom&quot;)
  
  
      print(&quot;Press enter to restart&quot;)
      input()
  </code></pre>