Browse Source

Update palindrome.py

PythonCoder8 4 years ago
parent
commit
95aed6b798
1 changed files with 5 additions and 2 deletions
  1. 5 2
      palindrome.py

+ 5 - 2
palindrome.py

@@ -1,5 +1,8 @@
+#Alternative program at https://github.com/PythonCoder8/python-sandbox/blob/main/palindrome-alternative.py
+
 text = input('Enter any text or number: ')
 text = input('Enter any text or number: ')
+
 if text[::-1] == text:
 if text[::-1] == text:
-    print('The text you entered is a palindrome')
+    print(f'The text "{text}" is a palindrome')
 elif text[::-1] != text:
 elif text[::-1] != text:
-    print('The text you entered is not a palindrome.')  
+    print(f'The text "{text}" is not a palindrome.')