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.in. 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
The file Palindrome.py that you will be submitting will have the following structure. You will follow the standard coding conventions in Python. Here is the format of your code:
# File: Palindrome.py # Description: # Student Name: # Student UT EID: # Partner Name: # Partner UT EID: # Course Name: CS 313E # Unique Number: # Date Created: # Date Last Modified:You may not change the names of the functions listed. They must have the functionality as given in the specifications. You can always add more functions than those listed.
For this assignment you may work with a partner. Both of you must read the paper on Pair Programming and abide by the ground rules as stated in that paper. If you are working with a partner then only one of you will submit the code. Make sure that in the header in you have your name and UT EID and your partner's name and UT EID. If you are working alone then you will just have your name and your UT EID.
Use the Canvas program to submit your Palindrome.py file. We should receive your work by 11 PM on Monday, 03 Oct 2022. There will be substantial penalties if you do not adhere to the guidelines.