From 3c60ecca158afe9fbec5fdce8adab7c491f95ede Mon Sep 17 00:00:00 2001 From: Prathima Kadari Date: Wed, 19 May 2021 21:43:28 +0530 Subject: [PATCH] Added palindrom program --- palindrome.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 palindrome.py diff --git a/palindrome.py b/palindrome.py new file mode 100644 index 0000000..c2f822f --- /dev/null +++ b/palindrome.py @@ -0,0 +1,11 @@ +__author__ = 'Prathima Kadari' + +num = input('Enter any number : ') +try: + val = int(num) + if num == str(num)[::-1]: + print('The given number is PALINDROME') + else: + print('The given number is NOT a palindrome') +except ValueError: + print("That's not a valid number, Try Again !")