🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित कोड का परिणाम क्या है ?

What is the output of the following code ?

import numpy as np
a = np.array([[1,2,3]])
print(a.shape)
A)
B)
C)
D)

Explanation:

Let's break it down:

  1. Array a:

    a = np.array([[1, 2, 3]])
    

    This creates a 2D array with one row and three columns:

    [[1, 2, 3]]
    
  2. Shape of a:

    print(a.shape)
    

    The shape of a is (1, 3) because it has 1 row and 3 columns.

Output: (1, 3)

Answer: (C) (1, 3)

Latest Updates