Course Solutions Uncategorized (Solved) : 1 Result Following Code Import Numpy Np X Nparray 1 4 5 Y X Print X Y Points 1 1 4 5 1 4 5 Q30082071 . . . .

(Solved) : 1 Result Following Code Import Numpy Np X Nparray 1 4 5 Y X Print X Y Points 1 1 4 5 1 4 5 Q30082071 . . . .

 

1. What is the result of the followingcode?
import numpy as np
x = np.array([1,4,5])
y = x
print(x + y) (Points : 1)       [1,4,5,1,4,5]
       [2,5,10]
       [2,8,10]
       [2,10,10]Question 2.2. Which Numpy function do you useto create an array? (Points : 1)       np
       np.array
       np.numpy
       numpyQuestion 3.3. What is the resulting Numpyarray z after executing the following lines of code?
import numpy as np
x = np.array([1, 2, 3])
y = np.array([3, 2, 1])
z = x + y (Points : 1)       array([4, 4, 4])
       array([1, 2, 3, 3, 2,1])
       array([2, 4, 6])
       array([13, 22, 31])Question 4.4. Which Python command do you useto select the string “g” from x shown below?
import numpy as np
x = np.array([[“a”, “b”, “c”, “d”], [“e”, “f”,

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post