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
En que parte del mall del rio venden tarjetas de google play en cuenca​
JulijaS [17]

chxgfk hcyskvuct auhchovuzq vuvscisv

6 0
3 years ago
When is the new season of legacies coming out on netflix
earnstyle [38]

Answer:

Not sure (I couldn't find info) but It is coming out on CW

Explanation:

It is coming out on CW on October 14 2021 so the Netflix release will be much later than that.

8 0
3 years ago
Why it is important for everyday people to have access to credible online information?
Citrus2011 [14]

Answer:

so you know what is true

Explanation:

5 0
4 years ago
Read 2 more answers
Karlie wants to eat a good breakfast before taking a test
babymother [125]
Yum sounds like a good idea
7 0
4 years ago
Read 2 more answers
Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
kykrilka [37]

Answer:

D. replacing cathode ray tube technology

Explanation:

In past few years traditional TV set are being replaced by LCD and LED tv technology. In Traditional TV sets, cathode ray tube is used that is large in size and heavy in weight. Due to this reason, the size of the TV set is too large.

The cathode ray technology is replaced with liquid crystal display (LCD) which may use plasma and Light emitting diode (LED) technology that are smaller in size that make TV sets slim and sleek. This the reason, that the size of TV is reduced significantly.

8 0
4 years ago
Other questions:
  • Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)
    8·1 answer
  • Which one of the following terms is defined as the material and surfaces upon which an artist works?
    9·1 answer
  • What is the full form of IE? ​
    9·1 answer
  • Number of frames displayed per second
    15·1 answer
  • Sandra is having difficulty with her reading assignment because she does not fully understand the language. Which online tool wo
    6·1 answer
  • Which of the following “invisible” marks represents an inserted tab?
    11·2 answers
  • What G-Suite Apps integrate with Forms
    14·2 answers
  • Consider the following method, which is intended to return the number of local maximum values in an array Local maximum values a
    6·1 answer
  • 4. Arnold curates articles that feature trending lists for an online website. His department is responsible
    5·1 answer
  • list three things that can spoil a printer if they are not of the correct specification and what damage may be caused​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!