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
  • Views 69
  • Created
  • Last Reply

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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.