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
How r u<br> ;)<br> happy what day is it
Ivahew [28]

Answer:

o

dw

Explanation:

5 0
2 years ago
Read 2 more answers
Endnotes are indicated by
V125BC [204]

Answer:

The answer is D because u have the uppercase letter bold

4 0
2 years ago
Read 2 more answers
⣠⣤⣤⣤⣤⣤⣶⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀
mestny [16]

Answer:

LOL sweet

Explanation:

4 0
2 years ago
Read 2 more answers
Write the document type declaration markup statement for an HTML5 file. Be sure to include the appropriate opening and closing b
GREYUIT [131]

Answer:

<!DOCTYPE html>

Explanation:

<!DOCTYPE html> is used in the HTML5. It is the document type declaration markup statement for an HTML5 file.

4 0
3 years ago
Using Turtle Graphics, write a program that will produce 2 Zs next to each other. It is irrelevant where these Zs appear and wha
LekaFEV [45]

Answer:

# import the  turtle library

from turtle import *

# create a turtle space

space = Screen()

# create a turtle object

z = Turtle()

 

# create a single Z

z.forward(50)

z.right(120)

z.forward(100)

z.left(120)

z.forward(50)

 

# adjust the turtle position

z.up()

z.left...

Explanation:

8 0
3 years ago
Other questions:
  • When reading data across the network (i.e. from a URL) in Python 3, what string method must be used to convert it to the interna
    9·1 answer
  • A ____ is any key that uniquely identifies each row.
    15·1 answer
  • List of most popular entertainment and culture websites
    15·1 answer
  • A company gives you a document to review. This document lays out the strengths and weaknesses of a proposed business venture. It
    13·1 answer
  • When individuals not involved in the development process are asked to test the game, this is called ________ group testing.
    11·1 answer
  • Part 2: a) Write VHDL code for a top module that invokes necessary components to display the four decimal digits on four seven-s
    5·1 answer
  • Is there anyone that knows how to work in Microsoft Access and someone that could help me on my test at 11 30am?​
    7·1 answer
  • In this class, it is very common for your computer screen to look like this. What is this?​
    5·1 answer
  • If a company gave you a free version of their software and encouraged you to try and improve it and share it with the only commu
    8·1 answer
  • You have received an update package for a critical application you are running on a virtual machine. You have been told to insta
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!