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
Which line of code will only allow a symbol to be stored in a variable?
nataly862011 [7]
<h2>Answer:</h2><h2></h2><h2>phone = int(input("What is your phone number?"))</h2><h2></h2><h2>Hope this helps, have a great day, stay safe, and positive!!</h2>

8 0
2 years ago
Read 2 more answers
Which of the following actions should you take when turning left at an intersection?
fomenos
The answer is B Okay good luck and dont...mess it up
8 0
3 years ago
Why can't I access my micro SD card on my Lenovo ThinkPad Yoga 11e? I'm trying to export some PNG files onto my Micro SD card, s
BabaBlast [244]

maybe you need a new sd card

6 0
3 years ago
after a few weeks of using facial recognition login, your infrared camera fails, and you are asked to enter your pin. because it
riadik2000 [5.3K]

The reason that you have not been locked out after several failed PIN login attempts is that your laptop does not have a TPM chip, and you have not set up BitLocker for lockout.

Technology known as Trusted Platform Module (TPM) is made to offer hardware-based, security-related functionality. Designed to perform cryptographic operations, a TPM chip is a safe crypto-processor. Malicious software cannot interfere with the TPM's security capabilities, and the chip has numerous physical security features to prevent tampering. Utilizing TPM technology has a number of major benefits, including the following:

  • Cryptographic keys should be created, stored, and used sparingly.
  • Utilize the burnt-in RSA key of the TPM to authenticate platform devices using TPM technology.
  • By recording security metrics, you can assist in ensuring platform integrity.

To learn more about TPM click here:

brainly.com/question/10742732

#SPJ4

7 0
10 months ago
When should you create an outline?
DIA [1.3K]

Answer:

hope you like it

Explanation:

Writing an outline can take place at any time during the writing process. Although it is most commonly used before beginning to write or doing research, this process can also take place during or after writing your paper to make sure your points are organized and make sense.

An outline is a first step for writing: a general, unfinished plan that you will use as a guideline in writing, not a finished product ready to publish. You should use it when you prepare to write a rough draft, before you started writing.

8 0
3 years ago
Other questions:
  • What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float?
    14·1 answer
  • Please help with this
    5·2 answers
  • A lever has an effort arm that is 8 meters long and the residence (load) arm that is 1.5 meters long, how much effort is needed
    7·1 answer
  • A form letter can be customized by using different fields in a __________.
    15·2 answers
  • In a five-choice multiple-choice test, which letter is most often the correct
    10·2 answers
  • Seeing an error message on the screen after you click on a link or icon may indicate that your PC doesn't have the correct _____
    15·1 answer
  • Hi guys, Im making a game. I want to make a collision event, but what is the code for making the wall and the box collide. I rea
    6·1 answer
  • Which of the following are examples of software? (Select all that apply)
    9·2 answers
  • 1. Create an optimized function "print s(n,s)" that prints the given argument s (representing a string) k times. k represents th
    7·1 answer
  • A multinational organization that offers web-based services has datacenters that are located only in the United State; however,
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!