answer.
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
OleMash
2 months 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:
oksian1 [950]2 months 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
Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu
oksian1 [950]
The UpdateTimeWindow() function takes timeStart, timeEnd, and offsetAmount as parameters. Both timeEnd and timeStart are pointers. Within this function, the syntax to modify these parameters is as follows: *timeStart += offsetAmount, incrementing the start time by offsetAmount, and similarly, *timeEnd += offsetAmount increments the end time by the same amount.
8 0
1 month ago
Sushant is a new manager and he wants to share his ideas and working protocol with his team.Compare the advantages and disadvant
oksian1 [950]

Answer:

Benefits of Oral Communication

  1. Utilizing visual aids such as PowerPoint during discussions can enhance his team's understanding of his concepts and procedures.
  2. Staff responses tend to be more immediate and sincere compared to written replies.

Drawbacks of Oral Communication

  1. If Sushant struggles with stage fright or lacks strong communication skills, it may negatively impact the team's perception of him.
  2. There is a risk that staff may forget portions of Sushant's spoken communication, as written information is generally more reliable for retention.

Benefits of Written Communication

  1. A well-crafted memo articulates Sushant's ideas and procedures clearly to the staff.
  2. A feedback questionnaire could be included for staff input.
  3. Clearly stated goals and objectives.

Drawbacks of Written Communication

  1. Excessively lengthy written material may pose challenges for comprehension or retention.

It is advisable for Sushant to prioritize written communication to share his ideas and protocols effectively.

3 0
3 months ago
A company operates on two types of servers: 2 large servers (L) and 4 smaller servers (S), with a combined total of 64GB RAM. Th
oksian1 [950]

Reasoning:

Let's denote the size of a large server as L and the size of a smaller server as S.

According to the data provided, we have two equations:

2L + 4S = 64.............(1)

and

L + 3S = 40...............(2)

To solve the equations, we proceed as follows:

2(2)-(1)

2L - 2L + 6S - 4S = 2*40 - 64

2S = 16

thus, S = 8..................(3), which indicates the size of the small server

Using (3) in (2) yields

L + 3(8) = 40

L = 40 - 24 = 16..............indicating the size of the large server

8 0
1 month ago
Which of the following is an object such as a field which can be inserted into a document
amid [951]

Response:

SORRY, but you need to ask a different question.

Reasoning:

since you didn't provide a complete question with options...

I can't assist with this one.

8 0
1 month ago
A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
zubka84 [1067]

Answer:

EMI and RFI

Explanation:

EMI, or Electromagnetic Interference, can also be referred to as Radio-frequency Interference (RFI) within the radio frequency domain.

An unshielded ethernet cable, made from copper, might function as an antenna; any external noise that interferes with it can corrupt the data signal, resulting in data integrity issues and distorted signals.

6 0
1 month ago
Other questions:
  • In cell F15, insert a function that will automatically display the word Discontinue if the value in cell D15 is less than 1500,
    6·1 answer
  • To what extent are the following computer systems instances of artificial intelligence:
    14·1 answer
  • A company decides to relocate its operations to another state in order to take advantage of some new business investment credits
    15·1 answer
  • How has the development of personal computer hardware and software reversed some of the trends brought on by the industrial revo
    15·1 answer
  • Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per li
    11·1 answer
  • Leah Jones is the IT manager at Rock Solid Outfitters, a medium-sized supplier of outdoor climbing and camping gear. Steve Allen
    13·1 answer
  • Allison wants to use equations to simplify the process of explaining something to the Sales team, but the default eq
    8·2 answers
  • The ____________ protocol enables two users to establish a secret key using a public-key scheme based on discrete logarithms
    10·1 answer
  • A ____ partition contains the data necessary to restore a hard drive back to its state at the time the computer was purchased an
    8·2 answers
  • 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
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!