Question: Python Program Question 2: Palindrome Name your program as LastName_FirstName_A3Q2.py Palindrome is a text, number or String that when reversed results in the same word

Python Program

Question 2: Palindrome Name your program as LastName_FirstName_A3Q2.py

Palindrome is a text, number or String that when reversed results in the same word or phrase. Right a python program that will take a string or a number as in put and find out if the string is a palindrome or not.

Variables to be declared are:

Word: variable that will save the user input of the String. revWord: variable that will store the reverse of the String word.

Input: the String word will be taken in as an input form the user. Output: The program will print notification word is a palindrome otherwise word is NOT a palindrome!

Other requirements: Make use of for or while loop to reverse the word and save it to revWord. Make use of if statement to compare the two strings and print the result. The program should consider cases. E.g. Civic and Hannah are palindromes even though first letter is capital C and H respectively.

Enter the phrase for palindrome verification: Hannah Hannah is a palindrome!

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!