LinkedIn Python Skill Assessment Quiz Answers

What will this code fragment return?

Latest Update on 25th January, 2022 by Certification Course Answers

What will this code fragment return?

import numpy as np
np.ones([1,2,3,4,5])
  1.  It returns a 5×5 matric; each row will have the values 1,2,3,4,5.
  2.  It returns an array with the values 1,2,3,4,5
  3.  It returns five different square matrices filled with ones. The first is 1×1, the second 2×2, and so on to 5×5
  4.  It returns a 5-dimensional array of size 1x2x3x4x5 filled with 1s.

Correct Answer:

  •  It returns a 5-dimensional array of size 1x2x3x4x5 filled with 1s.

Latest Updates

No posts found in this category.