Skip to content

Instantly share code, notes, and snippets.

@mightywombat
Created April 20, 2018 17:48
Show Gist options
  • Save mightywombat/632432cfd9fd281e4e7c5f35cce7c028 to your computer and use it in GitHub Desktop.
Save mightywombat/632432cfd9fd281e4e7c5f35cce7c028 to your computer and use it in GitHub Desktop.
practicepython.org Ex 06
# practicepython.org Ex 06
word_og = raw_input("Palindrome checker. Enter your palindrome: ")
word = word_og.replace(" ", "")
start = 0
while (len(word) / 2) > start:
end = -(start + 1)
if word[start] == word[end]:
start += 1
print ("So far so good...")
else:
print ("You are not a winner.")
break
if start >= (len(word) / 2):
print ("Surprisingly, this is a palindrome. What are the chances?")
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment