1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AleksandrR [38]
3 years ago
12

Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe

n the user enters "Quit", "quit", or "q" for the line of text.
Computers and Technology
1 answer:
dalvyx [7]3 years ago
7 0

Answer:

string=""

while string not in {"Quit","quit","q"}:

   string=input("Enter line to be reversed")   #line of text will be entered

   if string!="Quit" and string!="quit" and string!="q":    #If quit is not  entered

       print("Reverse of line is : ")

       print(string[::-1])

OUTPUT :

Enter line to be reversedThis code is in python language

Reverse of line is :  

egaugnal nohtyp ni si edoc sihT

Enter line to be reversedHello world

Reverse of line is :  

dlrow olleH

Enter line to be reversedquit

Explanation:In the above program, First a while loop is executed and checked if line of text is not 'quit', 'Quit' or 'q'. If condition is true, then loop is executed and in python any string or list can be traversed from end if step is given -1. Similarly line of text is accessed from the last element. If quit is entered, then the program will be broken out of the loop.

You might be interested in
Why do Linux administrators prefer to give sudo access to application teams instead of letting them su to root?
likoan [24]

Answer:

Explanation:

some distros like ubuntu do not even allow su to switch to root. furthermore the su to root is dangerous because the user becomes the all-powerful administrative account, so no warnings are issued if the application team user tries to do something system-breaking.

8 0
2 years ago
When you listen to a guitar duet and have trouble hearing the melody, which of the following would best explain the problem?
emmasim [6.3K]

Answer:

One of the guitarists is playing too loud.

Explanation:

My dad plays the guitar...?

I'm shocked it's not "not keeping a steady beat", so I'm certain this is it.

3 0
3 years ago
Read 2 more answers
True or False? You should never move an injured person.<br> True<br> False
EastWind [94]

Answer:

true

Explanation:

6 0
3 years ago
A section-lined area is always completely bounded or outlined by an?
Paraphin [41]
Visible outline.
hope this helps
8 0
3 years ago
A popular photo editing application provides customers with the option of accessing a web based version through a monthly subscr
Black_prince [1.1K]

Answer:

photoshop app that purchase with a lower price 3$ per month

6 0
2 years ago
Other questions:
  • According to the author, there are five hedging strategies organizations can pursue. One of them is: Select one: a. commit with
    5·1 answer
  • An electronic braille embosser that translates text from a braille keyboard to a printer:
    10·1 answer
  • When is Hytale coming out?<br><br><br> P.S it might be Mine-craft 2.0<br><br><br> :)
    7·1 answer
  • What is the maximum upload speed you can get on an isdl internet connection?
    9·1 answer
  • A keyboard is a/an _____. interconnector port packet NAS
    7·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • While the Internet is used to share many useful services and information, there are growing concerns about the way that the Inte
    8·1 answer
  • Which kind of typography focuses on the details of a character?
    10·1 answer
  • Does any of yall play rob lox?
    5·2 answers
  • Why is computer economics important?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!