4. Write a Python Numpy program to generate a numpy array in between number of 2 to 22.
The output is:
Expected Answer:
Numpy array: [ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22]
Sample Answer:
import numpy as np a = np.arange(2, 23) print('Numpy array:', a)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)