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
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