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]
2 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]2 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
A serial schedule:
Lina20 [59]

Answer:

B)

Explanation:

Is alwayd sorted sequentially in aceding order by transaction ID

6 0
2 years ago
Which of the following best describes a proxy firewall? A. It sends traffic through another host. B. It acts as a gateway for re
12345 [234]
The answer would be B, for your computer is considered a client instead of server.
6 0
3 years ago
The part of the computer that provides access to the Internet is the
andrew11 [14]

Answer:

MODEM

Explanation:

5 0
2 years ago
Which of the following guidelines about forwarding e-mail messages is most appropriate?
valentina_108 [34]
The last option: 

Avoid forwarding e-mail messages unless you have permission to do so.
5 0
3 years ago
Read 2 more answers
Which of the following is an example of a logic error?
rusak2 [61]

Answer:

Receiving unexpected results from a program

Explanation:

Logic errors are due to the program not producing a desired result.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Software license infringement is also often called software __________.
    11·2 answers
  • A local area network works as a ____ network in that clusters of workstations are connected to a central point (hub or switch) t
    6·1 answer
  • Write a function named delete Letter that has 2 parameters. The first parameter is a string, the second parameter is an integer.
    11·1 answer
  • You want to know what directories in your account hold C files. You can use the command:______.
    9·1 answer
  • If you have two redo log groups with four members each, what’s the optimal number of disks you need to provide appropriate prote
    5·1 answer
  • What is the CSS property used to style text as all lowercase or uppercase?
    14·2 answers
  • Please help!!!! will mark brainliest!!
    7·2 answers
  • What are the 5 font/typography families
    14·1 answer
  • Suppose the ESPN website uses 8-bit unsigned integers to store how many points a team has scored in
    12·1 answer
  • Common names for computer-based information systems are transaction processing, management information, ________, and executive
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!