Question: Write a program that prompts the user for a name (assume it will be a one-word string). Change the string to lowercase and print it

Write a program that prompts the user for a name (assume it will be a one-word string). Change the string to lowercase and print it out in reverse, with only the first letter of the reversed word in uppercase. If the name is the same forward as it is backward, add an additional print statement on the next line that says Palindrome!. If a single character is entered, your program should print some kind of "good bye" message and terminate.

Hint: Use s.lower() and s.upper(), as appropriate.

Your code should reproduce the following examples:

>Enter your name: Paul Luap

>Enter your name: ANA Ana 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!