Question: Write a program that will read in from a file named input.txt one line at a time. For each line, print out TRUE or FALSE

 Write a program that will read in from a file named

Write a program that will read in from a file named input.txt one line at a time. For each line, print out TRUE or FALSE depending on if the line is a palindrome. A palindrome is a string of letters or a string of numbers that is the same forward and backwards after the punctuation is removed. For more information on palindromes check out the Wikipedia page G. The program must be written with loops and you should only have your main method. Also, you are not to use regular expression (regex) to solve the problem. If you solve it with regex or methods, you will receive a zero on the assignment and asked to redo it because we have not learned those methods yet, so it typically is because you found code on the internet. Input Type \& Format - The input will come in the form of a file named input.txt - There will be all letters or all numbers with special characters per line in the file. Output Examples: If input.txt is "Madagm I'm Adam. In racecar In boat In 123321 in 1234 " the output would be True True False True False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!