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
umka2103 [35]
3 years ago
12

Write a program that reads a list of 10 integers, and outputs those integers in reverse. For coding simplicity, follow each outp

ut integer by a space, including the last one. Then, output a newline.Ex: If the input is 2 4 6 8 10 12 14 16 18 20, the output is:20 18 16 14 12 10 8 6 4 2To achieve the above, first read the integers into an array. Then output the array in reverse.integer array(10) userInts
Computers and Technology
1 answer:
labwork [276]3 years ago
5 0

Answer:

arr = []

for i in range(10):

   x = int(input("Enter a number: "))

   arr.append(x)

arr.reverse()

for n in arr:

   print(str(n), end=" ")

Explanation:

Initialize an array

Create a for loop to fill the array with user input

Inside the loop, ask the user for the numbers and put them in the array

When the loop is done, reverse the array using reverse function

Create another for loop to print the numbers with space between them

You might be interested in
Grooves and polished surfaces on desert pebbles are most likely caused by
Serga [27]
B. abrasion. Abrasion is pretty much friction on the rocks. Yardangs don't really apply to this situation and I have never heard of a deflated rock:P Hope that helps:) 
7 0
3 years ago
What is the difference between word processing software and presentation software​
Gnesinka [82]

Answer:

Word is a word processing program. PowerPoint is presentation software. MS Word is used for preparing documents which have higher quantum of text and tables. ... On the other hand, MS Powerpoint is used in cases where you want to give a presentation.

3 0
3 years ago
What are the three main components of an IF function?
Lesechka [4]
Test somthing such as the value in a cell
4 0
3 years ago
เเปลภาษานิราศภูเขาทอง
Marianna [84]
Type it up in English
4 0
3 years ago
How many days till earth ends
expeople1 [14]
Several Billion years
5 0
3 years ago
Other questions:
  • When troubleshooting firewalls, which of the following is not something you should do after you attempt a fix?
    7·1 answer
  • You can create user accounts on the linux system by using the ____ command.
    9·1 answer
  • Explain and Define the four types of maintenance in IT?
    11·1 answer
  • Which topology connects all the computers in a circular pattern
    13·2 answers
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • The algorithm ADDN implements N-bit fixed-width binary addition for non-negative integers and ignores overflows. For example, AD
    13·1 answer
  • If you decide you want to meet someone you met online, what should you do first? A. Tell your best friend. B. Call the person yo
    12·1 answer
  • FOR DIGITAL DESIGN/ PHOTOGRAPHY
    5·2 answers
  • The programming interface for a legacy motor controller accepts commands as binary strings of variable lengths.
    15·1 answer
  • Software that allows users to use and adapt it for any purpose, often allowing the public to participate in further development
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!