Introduction to Programming
in Python
LATEST FA REVIEW
Q&S
©2024/2025
,1. Which Python library is primarily used for data manipulation
and analysis?
a) NumPy
b) Pandas
c) Matplotlib
d) Scikit-learn
ANS: b) Pandas
2. In Python, which method can be used to read an entire dataset
from a text file into a DataFrame?
a) read_txt
b) read_table
c) read_csv
d) read_excel
ANS: c) read_csv
3. Which data type in Python is used to handle decimal numbers
accurately in financial and monetarist computations?
a) float
©2024/2025
, b) int
c) decimal
d) double
ANS: c) decimal
4. What does the `.iloc` function allow you to do in a Pandas
DataFrame?
a) Select data by labels
b) Select data by index position
c) Insert a column based on labels
d) Locate missing values
ANS: b) Select data by index position
### Fill-in-the-Blank
5. In Python, to perform element-wise operations on entire arrays
or lists efficiently, you typically use the __________ library.
ANS: NumPy
6. When handling missing values in a DataFrame, the function
__________ can be used to replace them with a specified value.
©2024/2025