Jump to content

Featured Replies

Posted

Challenge:

Write a program that checks if a given string is a palindrome. A palindrome is a word, phrase, number, or sequence of characters that reads the same backward as forward, ignoring spaces, punctuation, and capitalization.

Requirements:

  1. Accept user input for the string.
  2. Normalize the string by removing non-alphanumeric characters and converting it to lowercase.
  3. Check if the normalized string is a palindrome.
  4. Print True or False based on the result.

Bonus:

  • Extend the program to handle numeric palindromes (e.g., 12321).
  • Allow the user to check multiple strings in one run.

Example Output:

  1. Input: "A man, a plan, a canal, Panama!"
    Output: True
  2. Input: "Hello, World!"
    Output: False

CodeName: Jessica

💻 Linux Enthusiast | 🌍 Adventurer | 🦄 Unicorn 
🌐 My Site | 📢 Join the Forum

spacer.png

 

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.