Page 303 - Ai_C10_Flipbook
P. 303
2. What is the main advantage of using NumPy arrays over Python lists?
Ans. The main advantage of using NumPy arrays over Python lists are:
• NumPy arrays are more memory effecient while Python List occupies more memory.
• NumPy arrays are mostly used for scientific computing, numerical operations, and data analysis while Python list are
used for data storage and management.
3. What is the primary function of Matplotlib in Python?
Ans. Matplotlib allows the creation of static, animated, and interactive visualizations such as line charts, bar graphs, and
scatter plots.
4. What does scipy.fftpack module in SciPy include?
Ans. scipy.fftpack module contains functions for fast Fourier transforms (FFT) and related operations for efficient spectral
analysis.
Unsolved Questions
SECTION A (Objective Type Questions)
uiz
A. Tick ( ) the correct option.
1. Which of the following is not a module of SciPy?
a. scipy.stats b. scipy.linalg
c. scipy.math d. scipy.integrate
2. Which of the following is used to plot a line graph in Matplotlib?
a. plt.bar() b. plt.plot()
c. plt.hist() d. plt.pie()
3. What does the function np.arange(10, 101, 10) do in NumPy?
a. Creates an array with values from 1 to 10
b. Creates an array of values from 10 to 100 with a step of 10
c. Creates an array with random values
d. Creates an array of 10 random integers
4. Which data type is used to store mobile number?
a. Int b. Float
c. String d. Boolean
5. Choose the correct option with respect to Python.
a. Both tuples and lists are immutable b. Both tuples and lists are mutable
c. Tuples are immutable while lists are mutable d. Tuples are mutable while lists are immutable
6. A powerful tool for interactively developing and presenting Machine Learning projects with the help of Python.
a. Anaconda b. Ipython
c. MathLab d. Jupyter
B. Fill in the blanks.
1. ………………………. parameter with print() gives a separator between the objects.
2. The ………………………. statement is optional and if required can be only one in one if block.
3. ………………………. and ………………………. are used for division in Arithmetic operators.
4. Python got its name from ………………………..
5. To install SciPy in Python, you need to use the command ………………………..
6. To create a vertical bar chart, you can use the function ………………………. in Matplotlib.
Advance Python (Practical) 301

