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
While performing an automatic transmission service at 60,000 miles, the technician notices a grayish sludge on the magnet in the
Evgen [1.6K]

Answer:

Explanation:

One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.

Fill a rectangular baking glass dish with water.

Place a plastic bag with ice in the water near the left edge of the dish.

Place a lighted lamp near the left edge of the dish so that its light falls directly on the plastic bag.

Put a few drops of ink in the water.

The student did not observe any circulation of ink in the water as expected because the experiment had a flaw. Which of these statements best describes the flaw in the experiment? (2 points)

Not enough ink was added.

Not enough water was taken.

The dish was too small for the experiment.

The lamp and the ice bag were at the same place.

6 0
3 years ago
Choosing a per_formatted presentation that already has a design and the slots is called choosing What​
Aloiza [94]
A template is a predesigned presentation you can use to create a new slide show quickly. Templates often include custom formatting and designs, so they can save you a lot of time and effort when starting a new project.
8 0
2 years ago
Which leader of the Jamestown colony am I?
faltersainse [42]
I am not completely sure, but I believe that the leader of the Jamestown colony described in this paragraph is John Rolfe.
7 0
3 years ago
Read 2 more answers
each term to the appropriate definition. DBMS data mining hash file index key field locking protocol relation roll back schema S
ikadub [295]

Answer:

1. DBMS

C. <em>A storage system that provides efficient access to randomly chosen items</em>

G. <em>Performs database operations requested by application software</em>

2. data mining

B. <em>The process of extracting hidden information</em>

3. hash file

A. <em>A. means of locating a particular record within a file</em>

4. index key field

F. <em>An item used to identify records uniquely</em>

5. locking protocol

E. <em>A system to guard against database errors due to performing transactions concurrently</em>

6. relation

D. <em>A structural unit (with rows and columns) in a popular database model</em>

7. roll back schema

I. <em>A "road map" of a particular database's design</em>

J. <em>To "unwind" a transaction</em>

8. SQL

H. <em>A popular language that implements relational database operations.</em>

5 0
3 years ago
A(n) _______ attack attempts to make a server or network unavailable to serve legitimate users by flooding it with attack packet
malfutka [58]

Answer:

DoS or Denial of Service

Explanation:

Have a nice day! :)

3 0
3 years ago
Other questions:
  • Which translator program reads small portions of a program at a time, translating them into machine instructions which are then
    12·1 answer
  • Why should spain go to Africa ​
    15·1 answer
  • A student has five college classes and has to complete reports or projects for each class. The student is in his sophomore year
    15·2 answers
  • Assume that a is an array of two or more integers, and that b and c are integers.
    13·1 answer
  • Evaluate the following expression with precedence of operator:<br> ​ X = 2* 3/ 5 + 10 //3 – 1
    13·1 answer
  • One key feature of malware is that it:
    13·1 answer
  • What is the value of numX when this program is executed? if 3 &lt; 5 and 8 != 3: numX = 3 else: numX = 7
    13·2 answers
  • True false.
    10·2 answers
  • URGENT HELPP<br> WILL MARK BRAINLIST
    6·1 answer
  • Determine the value of a and b at the end of the following code segment:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!