Question
Write a program in python that reads in a text from the user. The program should print out a text where the first and last
Write a program in python that reads in a text from the user. The program should print out a text where the first and last letters are unchanged, but all other letters appear in a reverse order. I.e. print the word backwards, except for the first and last letters - those should be unchanged. The program should continue to do this until the user writes 'quit'. The program should include a function that handles the reordering of the letters in the text. This function should not print anything, just take a string as parameter and return a string with the correct output. Examples: Input: Hello Hlleo Input: testing123 t21gnitse3 Input: quit Input: racecar racecar Input: what is happening? wgnineppah si tah? Input: 123 123 Input: 1234 1324 Input: quit Input: quit Input: andsomething anihtemosdng Input: lkjsfd lfsjkd Input: quit Input: one one Input: two two Input: three terhe Input: and and Input: quit
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