Introduction to Numpy
CBSE · Class 11 · Informatics Practices
NCERT Solutions for Introduction to Numpy — CBSE Class 11 Informatics Practices.
Interactive on Super Tutor
Studying Introduction to Numpy? Get the full interactive chapter.
Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for ncert solutions and more.
1,000+ Class 11 students started this chapter today
26 worked solutions below. Unlock all 52 free in Super Tutor
EXERCISE
1What is NumPy ? How to install it?Show solution
```bash
pip install NumPy
```
Not sure why a step works? check your working in Super Tutor
2What is an array and how is it different from a list? What is the name of the built-in array class in NumPy ?Show solution
A list in Python can contain elements of different data types, is not stored contiguously in memory, and does not support element-wise operations like arrays do.
The built-in array class in NumPy is called ndarray.
Not sure why a step works? check your working in Super Tutor
3What do you understand by rank of an ndarray?Show solution
Not sure why a step works? check your working in Super Tutor
4(a)A 1-D array called zeros having 10 elements and all the elements are set to zero.Show solution
```python
np.zeros(10)
```
This creates an array of 10 elements, all set to zero.
Not sure why a step works? check your working in Super Tutor
4(b)A 1-D array called vowels having the elements 'a', 'e', 'i', 'o' and 'u'.Show solution
```python
np.array(['a', 'e', 'i', 'o', 'u'])
```
Not sure why a step works? check your working in Super Tutor
4(c)A 2-D array called ones having 2 rows and 5 columns and all the elements are set to 1 and dtype as int.Show solution
```python
np.ones((2, 5), dtype=int)
```
Not sure why a step works? check your working in Super Tutor
4(d)Use nested Python lists to create a 2-D array called myarray1 having 3 rows and 3 columns and store the following data:
2.7, -2, -19
0, 3.4, 99.9
10.6, 0, 13Show solution
```python
np.array([[2.7, -2, -19], [0, 3.4, 99.9], [10.6, 0, 13]])
```
Not sure why a step works? check your working in Super Tutor
4(e)A 2-D array called myarray2 using arange() having 3 rows and 5 columns with start value = 4, step size 4 and dtype as float.Show solution
So the command is:
```python
np.arange(4, 64, 4, dtype=float).reshape(3, 5)
```
Not sure why a step works? check your working in Super Tutor
5(a)Find the dimensions, shape, size, data type of the items and itemsize of arrays zeros, vowels, ones, myarray1 and myarray2.Show solution
- zeros: `zeros.ndim`, `zeros.shape`, `zeros.size`, `zeros.dtype`, `zeros.itemsize`
- vowels: `vowels.ndim`, `vowels.shape`, `vowels.size`, `vowels.dtype`, `vowels.itemsize`
- ones: `ones.ndim`, `ones.shape`, `ones.size`, `ones.dtype`, `ones.itemsize`
- myarray1: `myarray1.ndim`, `myarray1.shape`, `myarray1.size`, `myarray1.dtype`, `myarray1.itemsize`
- myarray2: `myarray2.ndim`, `myarray2.shape`, `myarray2.size`, `myarray2.dtype`, `myarray2.itemsize`
These give the dimensions, shape, size, data type, and itemsize of each array.
Not sure why a step works? check your working in Super Tutor
5(b)Reshape the array ones to have all the 10 elements in a single row.Show solution
```python
ones.reshape(1, 10)
```
Not sure why a step works? check your working in Super Tutor
5(c)Display the 2nd and 3rd element of the array vowels.Show solution
```python
vowels[1:3]
```
Not sure why a step works? check your working in Super Tutor
5(d)Display all elements in the 2nd and 3rd row of the array myarray1.Show solution
```python
myarray1[1:3, :]
```
Not sure why a step works? check your working in Super Tutor
5(e)Display the elements in the 1st and 2nd column of the array myarray1.Show solution
```python
myarray1[:, 0:2]
```
Not sure why a step works? check your working in Super Tutor
5(f)Display the elements in the 1st column of the 2nd and 3rd row of the array myarray1.Show solution
```python
myarray1[1:3, 0]
```
Not sure why a step works? check your working in Super Tutor
5(g)Reverse the array of vowels.Show solution
```python
vowels[::-1]
```
Not sure why a step works? check your working in Super Tutor
6(a)Divide all elements of array ones by 3.Show solution
```python
ones / 3
```
Not sure why a step works? check your working in Super Tutor
6(b)Add the arrays myarray1 and myarray2.Show solution
```python
myarray1 + myarray2
```
Not sure why a step works? check your working in Super Tutor
6(c)Subtract myarray1 from myarray2 and store the result in a new array.Show solution
```python
myarray2 - myarray1
```
Not sure why a step works? check your working in Super Tutor
6(d)Multiply myarray1 and myarray2 elementwise.Show solution
```python
myarray1 * myarray2
```
Not sure why a step works? check your working in Super Tutor
6(e)Do the matrix multiplication of myarray1 and myarray2 and store the result in a new array myarray3.Show solution
```python
myarray1 @ myarray2
```
Not sure why a step works? check your working in Super Tutor
6(f)Divide myarray1 by myarray2.Show solution
```python
myarray1 / myarray2
```
Not sure why a step works? check your working in Super Tutor
6(g)Find the cube of all elements of myarray1 and divide the resulting array by 2.Show solution
```python
(myarray1 3) / 2
```
Not sure why a step works? check your working in Super Tutor
6(h)Find the square root of all elements of myarray2 and divide the resulting array by 2. The result should be rounded to two places of decimals.Show solution
```python
np.round(np.sqrt(myarray2) / 2, 2)
```
Not sure why a step works? check your working in Super Tutor
7(a)Find the transpose of ones and myarray2.Show solution
```python
ones.transpose()
myarray2.transpose()
```
Not sure why a step works? check your working in Super Tutor
7(b)Sort the array vowels in reverse.Show solution
```python
vowels.sort()
vowels[::-1]
```
Not sure why a step works? check your working in Super Tutor
7(c)Sort the array myarray1 such that it brings the lowest value of the column in the first row and so on.Show solution
```python
myarray1.sort(axis=0)
```
Not sure why a step works? check your working in Super Tutor
26 more solved questions in Introduction to Numpy
Every remaining exercise is solved step by step in Super Tutor, plus practice quizzes and flashcards for this chapter. Free to start.
Stuck on a step?
Ask Super Tutor AI to explain any solution on this page in a simpler way — free, 24x7.
Ask a Doubt FreeFrequently Asked Questions
What are the important topics in Introduction to Numpy for CBSE Class 11 Informatics Practices?
How to score full marks in Introduction to Numpy — CBSE Class 11 Informatics Practices?
Where can I get free NCERT Solutions for Introduction to Numpy Class 11 Informatics Practices?
Sources & Official References
- NCERT Official — ncert.nic.in
- CBSE Academic — cbseacademic.nic.in
- CBSE Official — cbse.gov.in
- National Education Policy 2020 — education.gov.in
Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.
More resources for Introduction to Numpy
Practice Quiz
Test yourself with a quick quiz
Important Questions
Practice with board exam-style questions
Revision Notes
Key points for last-minute revision
Formula Sheet
All formulas in one place
Chapter Summary
Understand the chapter at a glance
Concept Maps
See how topics connect visually
Study Plan
Step-by-step plan to ace this chapter
Flashcards
Quick-fire cards for active recall
Syllabus
What topics to cover
For serious students
Get the full Introduction to Numpy chapter — for free.
Quizzes, flashcards, AI doubt-solver and a step-by-step study plan for CBSE Class 11 Informatics Practices.