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
Get step-by-step solutions from verified subject matter experts
