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
Setler [38]
3 years ago
8

Create the logic for a program that prompts a user for 12 numbers and stores them in an array. Pass the array to a method that r

everses the order of the numbers. Display the reversed numbers in the main program.
Computers and Technology
1 answer:
REY [17]3 years ago
7 0

Answer:

Explanation:

The following program is written in Python. It first creates a method that reverses the array using the built in reverse function. Then it creates the array, creates a loop to ask the user to enter 12 numbers while passing each input into the array. Finally, it passes that array into the previously created reverse method and prints out the new array.

def reverse(num_arr):

   num_arr.reverse()

   return num_arr

num_arr = []

for x in range(12):

   num = input("Enter a number")

   num_arr.append(num)

print(reverse(num_arr))

You might be interested in
Henry must choose which type of smart speaker to use in his home. He asked you to help him decide which one will best suit his n
ch4aika [34]

Answer:

(B) Home

Explanation:

Echo is an Amazon product.

Home is a smart speaker developed by Google.  

Cortana is a product of Microsoft.

HomePod is developed by Apple.

If Henry wants to be connected to his Google account, you would recommend him to buy Home, because it is a Google product.

4 0
3 years ago
Jake is photographing his pet puppy. He wants to preview the image the camera will capture. What part of the camera that is insi
german

A. i think that is right

3 0
3 years ago
Read 2 more answers
A file name extension provides what information about a file?
ASHA 777 [7]
In a file extension, it tells what type of file it is and tells what compiler to run the code.
8 0
3 years ago
Read 2 more answers
. SQL is a(n) _____ language.
Blababa [14]

Answer: Fourth- generation language

Explanation:Structured Query Language (SQL) is the language that is in the form of database structure which helps in the manipulation of the data and management as well.

SQL is considered as the fourth generation language because it is used for the accessing of the data from the database.It is also known for the advancement in the third generation language and thus also improving the language interface with users.

7 0
3 years ago
Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between
Cerrena [4.2K]

Answer:

see explaination

Explanation:

import random

def number_guess(num):

n = random.randint(1, 100)

if num < n:

print(num, "is too low. Random number was " + str(n) + ".")

elif num > n:

print(num, "is too high. Random number was " + str(n) + ".")

else:

print(num, "is correct!")

if __name__ == '__main__':

# Use the seed 900 to get the same pseudo random numbers every time

random.seed(900)

# Convert the string tokens into integers

user_input = input()

tokens = user_input.split()

for token in tokens:

num = int(token)

number_guess(num)

5 0
3 years ago
Other questions:
  • When a defendant pleads guilty to one offense just to have another offense dropped, this is what type of plea bargain
    12·2 answers
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by
    10·1 answer
  • Gray London is a retired race car driver who helped Dale Earnhardt, Jr. get his start. He is writing a book and making a video a
    9·1 answer
  • I'm not sure how to do these. By the way, it has to be python.
    13·1 answer
  • Binary Search:<br><br><br> 2 6 15 42 55 89 111 256
    6·1 answer
  • The term phreaker is now commonly associated with an individual who cracks or removes software protection that is designed to pr
    13·2 answers
  • Which of the examples is part of client-side code?
    12·1 answer
  • Write a program that asks the user to enter a series of single digit numbers with nothing separating them. Read the input as a C
    12·1 answer
  • KDS Company has 3 departments: 1. Dept X 2. Dept Y 3. Dept Z. Design a program that will read as input each department's sales f
    6·1 answer
  • Is it okay for potential employers to search your social media for use in determining if you are a fit for the position?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!