Question: Write a python program that reads strings (without digits or symbols in the string) typed by the user until an empty string is entered. For
Output should be like this:
Enter a string: Three Rings for the eleven kings under the sky
Output: under three the the sky rings kings for eleven
Enter a string: Seven for the Dwarf lords in their halls of stone
Output: their the stone seven of lords in halls for dwarf
Enter a string: Nine for Mortal Men doomed to die
Output: to nine mortal men for doomed die
Enter a string: One for the Dark Lord on his dark throne
Output: throne the one on lord his for dark dark
Enter a string: In the land of Mordor where the Shadows lie
Output: where the the shadows of mordor lie land in
Step by Step Solution
3.30 Rating (150 Votes )
There are 3 Steps involved in it
Program while True a inputEnter a string or press enter to Quit need to enter the string given in qu... View full answer
Get step-by-step solutions from verified subject matter experts
