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
1 month 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 [804]1 month 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
If a packet gets “sucked down a black hole” (figuratively speaking) and is not received by its sender, and no message is sent ba
Harlamova29_29 [932]

If a packet gets figuratively “sucked into a black hole” and is not received by the original sender, with no message returned to clarify the situation, there is an issue. This lack of communication indicates there is a problem with the _____.

A.) ICMP

B.) TCP/IP

C.) HTTP

D.) ISO

A.) ICMP

I hope this information is useful and wish you the best.

~May

0 0
1 month ago
Declare a constant named YEAR, and initialize YEAR with the value 2050. Edit the statement myNewAge = myCurrentAge + (2050 − cur
amid [812]

Answer:

The following changes will be implemented to the source code

const int YEAR = 2050;

cout << "I will be " << myNewAge << " in "<<YEAR<<"." << endl;

Explanation:

First, YEAR needs to be defined as a constant integer. This is represented as follows;

const int YEAR = 2050;

This allows us to refer to YEAR throughout the program

Next,

Substitute the following:

cout << "I will be " << myNewAge << " in 2050." << endl;

with

cout << "I will be " << myNewAge << " in "<<YEAR<<"." << endl;

The revised source file is attached;

Download cpp
7 0
1 month ago
Ishaan is confused between the terms webpage and website help him in understanding the difference between both​
maria [879]

Answer:

A webpage serves as a single page within a website, while a website encompasses a collection of such pages offering valuable information.

Explanation:

Please follow

7 0
20 days ago
Would two bits be enough to assign a unique binary number to each vowel in the English language? Explain.
Harlamova29_29 [932]

Response:

No.

Clarification:

Since there are 5 vowels, at least 3 bits are necessary to represent them all. Utilizing 2 bits yields 2²=4 combinations, which isn’t enough. However, using 3 bits provides 2³=8 combinations, sufficiently covering the 5 vowels.

3 0
1 month ago
Henry is working from a USDA office. He has several tasks to perform today: 1) he logs onto his USDA computer to get started; 2)
8_murik_8 [892]

Answer:

A. Discussing confidential matters over a mobile phone

Explanation:

In general, the signals from mobile phones are not secure. Sensitive discussions should never occur on phones that lack the necessary encryption.

3 0
1 month ago
Other questions:
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    6·1 answer
  •  How does critically analyzing technology add value to interactions with people in personal and professional contexts?
    9·2 answers
  • Explain why the cost of ownership may be lower with a cloud database than with a traditional, company database.
    9·1 answer
  • Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a
    11·1 answer
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, prin
    14·1 answer
  • Write a loop that prints each country's population in country_pop. Sample output for the given program.
    6·1 answer
  • (Java)Write a program that calculates and displays the conversion of an entered number of dollars into currency denominations—20
    11·1 answer
  • Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
    9·1 answer
  • When long labels are required, which of these commands can you use to improve readability of a worksheet?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!