From 6feca5b8682b02a798b38601467c0481c0bee521 Mon Sep 17 00:00:00 2001 From: Aviral Goel Date: Tue, 8 Jul 2025 14:02:31 +0530 Subject: [PATCH] My first beginner python code --- palindrom_checker.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 palindrom_checker.py diff --git a/palindrom_checker.py b/palindrom_checker.py new file mode 100644 index 00000000..34e16419 --- /dev/null +++ b/palindrom_checker.py @@ -0,0 +1,10 @@ +def is_pal(s): + return s == s[::-1] + +if __name__ == "__main__": + word = input("Please enter the word of your choice: ") + if is_pal(word): + print("Yes! The word is a palindrome") + else: + print("Oops! The word is not a palindrome") +