Welcome to the Palindrome Checker page.
This page contains a brief description and implementation instructions for the project.
Project Description
Checks whether a word or phrase reads the same forwards and backwards (ignoring spaces/punctuation). The user enters a string, and the program reports if it’s a palindrome.
Project Requirements
Python 3.x (no libraries needed).
How to Run the Project
- Create a script (e.g.
palindrome.py
) that prompts for a text string. - Run it:
python palindrome.py
. Enter text; the program outputs “Palindrome” or “Not a palindrome”.
Key Concepts Learned
- String Processing: Removing non-alphabetic characters and case-normalizing.
- Slicing: Using string slicing (e.g.
text[::-1]
) to reverse a string. - Control Flow: Comparing strings and printing results.
Possible Extensions
- Handle numbers and punctuation (ignore them).
- Check palindromic sentences/phrases.
- Create a list of palindromes from a file.