Definition
A palindrome is a word, number, phrase, or other sequence of
symbols that reads the same backwards as forwards.
(Wikipedia)
Project #1
Create an interactive program to test for palindromes.
Use either string indices or string slices.
- ask the user to input a string
- test if it is a palindrome
- display pertinent information
- loop
Better yet, allow the user to select if the want to use
string indices or string slices.
Design Questions:
- are uppercase and lowercase different
or are they the same?
- what about spaces?
- what about punctuation?
- do you test words, numbers, phrases, or sequence of
symbols differently?
- which language/character set (multiple languages/character sets?)
(English, Spanish, Hangul, German, Chinese, UTF-8, ...?)
Project #2
Process a text file, book, ... and
find all of the unique palindromes in it.
Display the count and the palindromes.
Links
37 English Palindromes
List of English palindromic phrases
(Wikipedia)
How To Index and Slice Strings in Python 3