Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a script that prompts the user for his or her name. Using a while loop tha

ID: 3905569 • Letter: W

Question

Write a script that prompts the user for his or her name. Using a while loop that counts downwards, print the name with the letters reversed. You may use s.lower () and s.upper ) to change a string s to lowercase and uppercase letters. Enter your name: Paul Luap If the name is the same forward and backwards, print "Palindrome!" on the next line Enter your name: Ana Ana Palindrome! *Hint: You can treat a single and double word name as a single string, or if you want to get fancy reverse each name independantly and test each to see if it is a palandrome

Explanation / Answer

name = input('Enter your name: ') reversed_name = str(name[::-1]).lower() print(reversed_name[0].upper() + reversed_name[1:]) if name.lower() == reversed_name.lower(): print('Palindrome!')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote