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
Blababa [14]
3 years ago
8

You are given an integer N, followed by N lines of input (1 <= N <= 100). Each line of input contains one or several words

separated with single spaces. Each word is a sequence of letters of English alphabet containing between 1 and 10 characters, inclusive. The total number of words in the input is between 1 and 100, inclusive
Your task is to reverse the order of words in each line of input, while preserving the words themselves. The lines of your output should not have any trailing or leading spaces.
Computers and Technology
1 answer:
Fittoniya [83]3 years ago
3 0

Answer:

Python 3 code:

n = int(input())

rev_str = [ ]

for i in range(n):

   s = str(input())

   s.split()

   words = s.split(' ')

   string = [ ]

     

   for word in words:

       string.insert(0, word)

 

   rev_str.append(" ".join(string))

     

   #print(" ".join(string))

for i in range(len(rev_str)):

   print(rev_str[i])

Explanation:

You might be interested in
What process combines data from a list with the content of a document to provide personalized documentsWhat
Morgarella [4.7K]
Mail merge can combine data with the content of a document to make personalized documents.
6 0
3 years ago
Read 2 more answers
1. Readability, navigation, consistency, layout and typography are all factors which
miv72 [106K]

Answer:

1) Readability is the ease with which a reader can understand a written text. Readability is more than simply legibility—which is a measure of how easily a reader can distinguish individual letters or characters from each other.

2) Navigation is a field of study that focuses on the process of monitoring and controlling the movement of a craft or vehicle from one place to another. The field of navigation includes four general categories: land navigation, marine navigation, aeronautic navigation, and space navigation. It is also the term of art used for the specialized knowledge used by navigators to perform navigation tasks.

3) In classical deductive logic, a consistent theory is one that does not entail a contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent if it has a model, i.e., there exists an interpretation under which all formulas in the theory are true. This is the sense used in traditional Aristotelian logic, although in contemporary mathematical logic the term satisfiable is used instead.

4) The way in which the parts of something are arranged or laid out.

5) Typography is the art and technique of arranging type to make written language legible, readable and appealing when displayed. The arrangement of type involves selecting typefaces, point sizes, line lengths, line-spacing (leading), and letter-spacing (tracking), and adjusting the space between pairs of letters (kerning ).

Explanation:

Hope it helps :)

3 0
3 years ago
Who is considered as the father of computer science​
Andru [333]

Answer:

Turing is considered as the father of computer science

4 0
3 years ago
Read 2 more answers
Which type of bank account typically offers no iterest?
SCORPION-xisa [38]
Money market?? i think anyway.
8 0
3 years ago
Read 2 more answers
A mobile device user has tried to install a new app numerous times without success. She has closed all unused apps, disabled liv
elena-14-01-66 [18.8K]

The correct answer is B. Check for sufficient available storage space.  

Explanation:

One of the factors that can cause it is not possible to install a new app is insufficient storage as space in the mobile device is needed to save the app. This can be easily solved either by deleting apps and other content or expanding the memory available through a Micro SD card. Also, before attempting any major procedure such as a complete reset it is important to check the storage space availability. In this context, the user should check for sufficient available storage space (option B) because this might be the cause of the issue she is experiencing; also, this is a basic step before considering others such as performing a factory reset.

6 0
3 years ago
Other questions:
  • I need help to find out what is wrong with this program and my variable, "exponent" comes out as 0 in the output instead of the
    14·1 answer
  • To get a sense of your digital footprint, you should:
    15·2 answers
  • What kind of voltage do solar cells generate? Solar cells produce ______ voltage which is not usable by most household appliance
    15·1 answer
  • You have no control over who views your social network information
    13·2 answers
  • At what point in a vulnerability assessment would an attack tree be utilized?
    9·1 answer
  • Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it
    7·1 answer
  • 9.6 Code Practice, this is in Python, I need its quick!
    13·1 answer
  • What is the definition of shape
    14·2 answers
  • when connecting to a wireless local area network (wlan), what is the most important fact about the service set identifier (ssid)
    11·1 answer
  • This code is supposed to accept a word as input, and then print that word to the screen.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!