Guest User

Untitled

a guest
Oct 19th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. print("A palindrome is a word that reads the same forwards and backwards.")
  2. word = input("Give me a word. I'll tell you if it's a palindrome or not.")
  3.  
  4. def palindrome(word):
  5. if word == word[::-1]:
  6. print("It's a palindrome!")
  7. if word != word[::-1]:
  8. print("It's not a palindrome!")
  9.  
  10. palindrome(word)
Add Comment
Please, Sign In to add comment