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
ElenaW [278]
2 years ago
8

Use NumPy to recreate your answer to Question 1b. The input parameters will both be python lists, so you will need to convert th

e lists into arrays before performing your operations. The output should be a numpy array.
Computers and Technology
1 answer:
Elina [12.6K]2 years ago
7 0

Answer:

//To install the python’s numpy module on you system use following command

pip install numpy

//To use numpy module, need to import it i.e.

  • import numpy as np

/*Python’s Numpy module provides a function numpy.array() to create a Numpy Array from an another array like object in python like list or tuple etc or any nested sequence like list of list */

  • numpy.array (object, dtype =None, copy=True, order='K', subok=False, nadmin = 0 )

//To create a Numpy Array from list just pass the list object to numpy.array()

  • npArray = np.array([1,2,3,4,5,6,7,8,9])  
  • print('Contents of the ndArray : ')
  • print(npArray)
You might be interested in
Output a table that show the cube of the numbers 1-15<br> (C++)
Rainbow [258]

Answer:

The c++ program to display cube of numbers from 1 to 15 is given below.

#include <iostream>

using namespace std;

int main() {    

   // variables declared and initialized  

   int num = 15, k, cube;    

   cout << " Cubes of numbers from 1 to 15 are shown below " << endl;    

   for( k = 1; k <= num; k++ )

   {

       // cube is calculated for each value of k and displayed

       cube = k * k * k ;

       cout << " \t " << cube << endl;

   }

return 0;

}

 

OUTPUT

Cubes of numbers from 1 to 15 are shown below  

  1

  8

  27

  64

  125

  216

  343

  512

  729

  1000

  1331

  1728

  2197

  2744

  3375

Explanation:

The variables are declared and initialized for loop, cube and for condition in the loop – k, cube, num respectively.

Inside for loop which executes over k, beginning from 1 to 15, cube of each value of k is calculated and displayed. The loop executes 15 times. Hence, cube for numbers from 1 to 15 is displayed after it is calculated.

   for( k = 1; k <= num; k++ )

   {

      cube = k * k * k ;

       cout << " \t " << cube << endl;

   }

In the first execution of the loop, k is initialized to 1 and variable cube contains cube of 1. Hence, 1 is displayed on the screen.

In the second execution, k is incremented by 1 and holds the value 2. The variable cube contains cube of 2, which is calculated, and 8 gets displayed on the screen.

After each execution of the loop, value of k is incremented.

After 15 executions, value of k is incremented by 1 and k holds the value 16. This new value is greater than num. Hence, the loop terminates.

3 0
3 years ago
Thomas would like to know when is the best time of the season to plant his tomato seeds. Which type of informational reference s
kenny6666 [7]

In this question, the options are missing. Here is the complete question:

Thomas would like to know when is the best time of the season to plant his tomato seeds. Which type of informational reference should he use?

A. Encyclopedia

B. Atlas

C. Almanac

D. Any of these

The correct answer is Almanac

Explanation:

Knowing the season or month to plant specific seeds is a relevant factor that can determine whether a plant grows and thrives. Because of this Thomas needs accurate and complete information about the best time of the year to plant tomatoes. This information can be found in an almanac because almanacs include planting dates for different plants as well as weather forecasts and other important events that can affect agriculture. Moreover, this informational reference provides information about the current year, which makes it to be updated in the topics it covers.

4 0
3 years ago
To remove white space, double-click this icon.
sweet [91]
Follow these steps:<span>Click the Microsoft Office Button, and then click Word Options.
In the left pane, click Customize.In the Choose commands from list, click All Commands.<span>
Click White Space Between Pages, click Add, and then click OK.
The White Space Between Pages option will appear on the Quick Access Toolbar.</span></span>(google)
I hope I answered your question!
4 0
3 years ago
Which of the following are good backup methods you can use to protect important files and folders from loss in the case of a har
grigory [225]

Answer:A,B, and D

Explanation:

6 0
2 years ago
Read 2 more answers
Suppose a switch is built using a computer work station and that it can forward packets at a rate of 500,000 packets per second,
Marina86 [1]

Answer:

When the transmission exceeds 667 packets

Explanation:

In computer networking, a packet is a chunk of data transmitted across the network. The packet size of an Ethernet network is 1.5kilobytes, while the packet size of an IP packet payload is 64 kilobytes.

A switch is a physical network device that connects nodes or workstations while communicating the packets (or frames). The I/O bus size bandwidth is 1Gbps which allows approximately 667 packets. Once this packet size is crossed, the bus becomes a limiting factor or bottle neck.

3 0
3 years ago
Other questions:
  • What is are example of an engineered item?
    12·1 answer
  • Which of the following has likely attended vocational school?
    10·1 answer
  • How can i learn about networks
    15·1 answer
  • When records are in ____ order, they are arranged one after another on the basis of the value in a particular field.?
    9·1 answer
  • Which activity does not allow a person to perform any work while at the shop
    10·1 answer
  • What was the technology that defined each of the four generations of computers?
    12·1 answer
  • To implement a small database, a database designer must know the "1" and the "M" sides of each relationship and whether the rela
    13·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    12·2 answers
  • Assume a TCP sender is continuously sending 1,090-byte segments. If a TCP receiver advertises a window size of 5,718 bytes, and
    7·1 answer
  • Why does my roku tv keep disconnecting from the internet.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!