Advertisement
Adehumble

Week2 Coding Exercise 10

Feb 9th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #10
  2. def is_palindrome(character):
  3.     while character=="":
  4.         print("You must provide an input. Please try again")
  5.         break
  6.     if character[:]==character[::-1]:
  7.         print("True")
  8.     else:
  9.         print("False")
  10.  
  11. print("\tHello! Dear User. This program is written to test if a word is a PALINDROME. \n \tIt will prompts a DEFAULT ERROR STATEMENT if you did not supply any input. The program will also AUTOMATICALLY ends. \n \tHave Fun!")
  12. print("_______"*17)
  13. word=input("Enter any word, ")
  14. is_palindrome(word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement