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
I analyze data, as a consultant, for companies making important business decisions. In order to get my point across, which of th
ladessa [460]

Answer:

3

Explanation:

I've just taken the test and made a 100. 3 is the most logical answer aswell, it has more of an effect than the others.

4 0
3 years ago
A software-based _________ is dedicated to examining and blocking internet traffic.
igomit [66]

A software-based <u>Firewall</u> is dedicated to examining and blocking internet traffic.

7 0
3 years ago
Read 2 more answers
Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. Fo
N76 [4]

Answer:

this:name = 'John'

print("Is name == 'John'? I predict True.")

print(name == 'John')

print("\nIs name == 'Joy'? I predict False.")

print(car == 'Joy')

this:age = '28'

print("Is age == '28'? I predict True.")

print(age == '28')

print("\nIs age == '27'? I predict False.")

print(age == '27')

this:sex = 'Male'

print("Is sex == 'Female'? I predict True.")

print(sex == 'Female')

print("\nIs sex == 'Female'? I predict False.")

print(sex == 'Joy')

this:level = 'College'

print("Is level == 'High School'? I predict True.")

print(level == 'High School')

print("\nIs level == 'College'? I predict False.")

print(age == 'College')

Conditions 1 and 2 test for name and age

Both conditions are true

Hence, true values are returned

Conditions 3 and 4 tests for sex and level

Both conditions are false

Hence, false values are returned.

7 0
3 years ago
Which of the following is an example of a syntax error?
Yuri [45]

Answer:

misspelling a programming language word

Explanation:

Syntax error is the type of error in programming, when the programmer insert some symbol that is not present in directories or libraries, the programmer not followed the rules of that particular programming language that is understandable to compiler.

For example in C++, it is necessary to insert the semicolon (;) after each statement. If the programmer not insert the semicolon after each statement, the program will show the syntax error.

If the programmer use integer instead of int to assign datatype to the variable in C++, it will also leads to the syntax error. Because in C++ library, Integer is defined with the help of "int".

4 0
2 years ago
Essay : Explore an editing studio or research online about editing studios and prepare a report that describes the roles and res
olya-2409 [2.1K]

Editor is main role where he or she place proper graphics with sound effects and record the same and play and get the feedback from director and producer.

<u>Explanation:</u>

Normally editing the picture or video and remixing the video with sound are done by graphic designer, editor or sound engineer.

All three had do proper coordination to get proper output results

Graphic designer who makes the video or photo their color combinations and picture orientation.

Sound designed after the graphic mix been done sound engineer has play proper BGM and record sound.

7 0
2 years ago
Other questions:
  • Computer communications describes a process in which two or more computers or devices transfer ____.
    10·1 answer
  • 2. A body is thrown vertically<br>100 m/s Theme taken to retum​
    13·1 answer
  • A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
    5·1 answer
  • There are many different types of decision-making. Which of the following is NOT a type of decision-making? a. fiat rule b. sing
    15·2 answers
  • Olivia is trying to save for a new laptop computer. To help her save, she should start a _____. database financial statement per
    7·2 answers
  • Testing a function or program using test values that are at or near the values that change the outcome of the program is known a
    13·1 answer
  • A computer virus is a program that can copy itself and infect a computer without the permission of the owner. How do you think a
    9·1 answer
  • Frrrrrrrrrrreeeeeeeeee brainliest for u
    13·2 answers
  • How do i unblock a website on a school computer if a school blocks it?
    5·1 answer
  • How to print<br> 1<br> 321<br> 54321<br> 7654321<br> triangle pattern in python
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!