#!/usr/bin/env python3
# coding: utf8
'''
Created on October 31st, 2017
@author: Geetanjali
'''
import math
def is_palindrome(word):
"""
:param word: the word to be tested if it is a palindrome
:return flag: is set to True if word is a palindrome, else is set to False
"""
#We keep comparing the first and last letters in the word until we reach the middle.
for i in range(0, math.floor(len(word)/2)):
if(word[i] == word[len(word)-1-i]):
flag = True
else:
flag = False
break
return flag
if __name__ == '__main__':
word = input("Enter word: ")
print("Is the word you entered a palindrome? : "+str(is_palindrome(word)))