Theory Questions
What are Python libraries?
How do you install a Python library?
What is the purpose of NumPy library in Python?
Explain the use of the Pandas library in Python
What is Matplotlib used for in Python?
How can you handle dates and times in Python using the datetime library?
What is the purpose of the requests library in Python?
How does the scikit-learn library benefit machine learning tasks in Python?
Explain the role of the Flask library in Python.
What is the purpose of the BeautifulSoup library in Python?
Getting started with Python libraries PPT
Programming Questions
How do you import a library in Python?
How can you alias a library during import to provide a shorter name?
How do you generate a random integer between 1 and 100 using the random library?
How can you create a DataFrame in Pandas from a dictionary of data?
What is the method to install a library using pip?
How do you read a CSV file into a Pandas DataFrame?
How can you create a line plot using Matplotlib to visualize data?
How do you make an HTTP GET request using the requests library in Python?
How can you reshape a NumPy array into a 3×3 matrix?
What method do you use to perform a matrix multiplication in NumPy?
Output Questions
Create a NumPy array containing the numbers 1 to 5.
Using the Pandas library, read the CSV file named “data.csv” into a DataFrame named ‘df'
Use the requests
library to fetch the content of a webpage located at
How can you calculate the dot product of two NumPy arrays a
and b
?
Write a Flask route that returns the text “Hello, World!” when accessed.
Given the following Matplotlib code, what kind of plot will be generated?
What is the output of the following code that uses the requests library?
What is the purpose of the os
library in the following code snippet?
What is the output of the following argparse-based command-line program when run with python script.py --name Alice