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 is the practice of distributing responsibility among multiple people so that no one person has full control of
Sholpan [36]

Answer:

If the responsibilities are distributed ,the disputes amongst people wont take place because their wont be any partiality, everyone would be equal. Moreover it is difficult for one person to control everything at once and multiple people would help the work to be organized as everyone will have their own part of work which is supposed to be fulfilled.

8 0
3 years ago
The TechWorld goes on a fast pace, what do you think would be the solution to the growing amount of data being collected by the
Nuetrik [128]

The solution to the growing amount of data in software applications to have fully sustainable usage for customers is;

  • Development of a sustainable model for the future now requires data storage that is engineered to be lower power requirements, lower cooling requirements, and lower waste production.

<h3>Sustainable data storage and usage</h3>

The objective of Sustainable Data Storage Initiative is to spread awareness of the solutions that can reduce the environmental impact of high waste producing data centers.

The environmental impact of data infrastructure is growing as data workloads increase. Hence, building a sustainable model for the future now requires data storage that is engineered to be lower power requirements, lower cooling requirements, and lower waste production.

Read more on Sustainable data storage and usage;

brainly.com/question/24882256

7 0
2 years ago
Learning from and working collaboratively with individuals is being literate in which area
solniwko [45]
I think it should be civic literacy
7 0
3 years ago
Read 2 more answers
aquatic life zone such as acorans and their bays, estuaries, coastal wetlands, shorelines, coral reffs and mangrove forests?
Oksana_A [137]

Answer:

Iajajkwbwiw whw

Explanation:

Bshsiwiqnqiaowpwownsbbsdk akakwjnwkwnwkwnwoqknanamamalamkakakskwkwkwnwmw.

I hope u liked my answer. Thank u

6 0
3 years ago
Code.org lesson 8 level 5
Likurg_2 [28]

Answer:

and?

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • While driving you encounter an emergency vehicle stopped ahead. Discuss how the move over law applies to this situation and your
    13·1 answer
  • One of the major advantages of digital photography is the ability to see the shot as soon as you take it.
    13·1 answer
  • All the computers in this type of network are connected to two other computers.
    12·1 answer
  • What are you required to verify before allowing a person to operate your pwc?
    8·1 answer
  • A defensive driver's priority is __<br> A. efficiency<br> B. speed<br> C. handling<br> D. safety
    9·2 answers
  • print out the last even number from an array of integers, if there is no even number, then print out a sentence indicating so.
    5·1 answer
  • Holi alguien sabe como cambiar el gamertag en XBox App (para iOS)?
    9·1 answer
  • Out-of-order instruction execution can cause problems because a later instruction may depend on the results from an earlier inst
    6·1 answer
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
  • Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!