Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

LO 9.1 Identify the reasons firms create new products.

Answered: 1 week ago

Question

3 . 1 2 Give a definition of the referential integrity constraint

Answered: 1 week ago