Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

19. What is the resulting Numpy array z after executing the following lines of c

ID: 3910387 • Letter: 1

Question

19. What is the resulting Numpy array z after executing the following lines of code? import numpy as np x np.array(11, 2, 31) y -np.array(I3, 2, 1]) z = x + y (Points : 1) O array(I4, 4, 4]) O array(I1, 2, 3, 3, 2, 1]) O array([2, 4, 61) O array(I13, 22, 311) 20. What is the result of the following code? import numpy as np x-np.array([1,2,3], [4, 5, 61, 17,8,91) for value in x.flat: y+ value print (y) (Points : 1) 40 e 45 50 e 55 21. What is the output of the following.code? df pd.DataFrame(np.arange(9).reshape(3,3)), columns -list('ABC)) df.ix[o, 'A'] Points: 1)

Explanation / Answer

Solution:-

Q. 19.) The correct option is. (c),

Q20.) The correct option is. (b).

45

Q21.) The correct option is (a).

0

Q 22.) There is NO CORRECT OPTION as , the COrrct answer is:-

0 3

1 12

2 21

Q 23.) The correct option is (a.)

A B C

0 0.0 1 2

2 6.0 7 8

===============SOLUTION ENDS===============

Note:- The answers are itself self explanatory, Also, please upvote if it helped, Thanks!!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote