Answer:
while True:
values = str(input())
if values == 'quit' or values == 'Quit' or values == 'q':
break
print(values[::-1])
Explanation:
Firstly, save the code on a folder and save it with any name but it must end with .py . Example data.py, save.py, reverse.py etc. Afterward, you run the code on the python shell . On the shell type "python saved filename(save.py or data.py, reverse.py)"
I used python to solve the problem. Normally, if one wants to iterate or loop through a particular function or code you use a loop. In this case i used a while loop.
Using while True , the values will always loop since True is always True.
values = str(input()) , This code make sure the input is always a string, since we want only text.
if values == 'quit' or values == 'Quit' or values == 'q': , This code means the values should quit or stop working if the user input any of the text "quit" or "Quit" or "q".
print(values[::-1]) , This code means the input text should be reversed. example joy will be yoj
Generally, the code will always loop and print the reverse of the text unless it encounter any input value like "quit" or "Quit" or "q"