Question
This assignment is in python. Only answer if you are familiar with it. Any help is appreciated A string is palindromic if it reads the
This assignment is in python. Only answer if you are familiar with it. Any help is appreciated
A string is palindromic if it reads the same forwards and backwards. For example, radar and racecar are palindromes. In this programming exercise you will read in a string and return the smallest string that is palindromic by adding letters to the beginning of the string.
Input: You will read the data from a file called palindrome.txt. This file will have one string per line. Each string will have 1 to 100 lower case characters from a to z. There will be no digits, punctuation marks, or spaces in those strings.
Output: Your output will be the shortest palindrome that you can make by adding letters to the beginning of the string. There will be one palindrome per line in your output.
Sample Input:
a aa ab madam cbabcde
Sample Output:
a aa bab madam edcbabcde
palindrome.txt
a aa ab madam cbabcde
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started