[go: up one dir, main page]

0% found this document useful (0 votes)
42 views1 page

2 Python MCQs Exam

The document contains a series of questions and answers related to Django and data visualization using Matplotlib and Pandas. It covers topics such as project configuration, app creation, middleware functions, model-view relationships, and data handling techniques. Additionally, it addresses how to create plots and manage data within Pandas DataFrames.

Uploaded by

sait_80597
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views1 page

2 Python MCQs Exam

The document contains a series of questions and answers related to Django and data visualization using Matplotlib and Pandas. It covers topics such as project configuration, app creation, middleware functions, model-view relationships, and data handling techniques. Additionally, it addresses how to create plots and manage data within Pandas DataFrames.

Uploaded by

sait_80597
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

12.

What is the role of the A) To configure project-wide settings, such as


settings.py file in a database connections, installed apps, and
Django project? middleware., B) To define the project's URL
patterns., C) To create the project's models., D) To
handle user authentication.
13. How do you create a A) Using the django-admin startapp command., B)
new Django app within Using the create_app command., C) By manually
a project? creating the app's files., D) By copying an existing
app.
14. What is the purpose of A) To modify incoming and outgoing HTTP requests
the middleware in a and responses., B) To handle user authentication.,
Django project? C) To connect to the database., D) To render
templates.
15. What is the relationship A) Models define the data structure, and views
between models and handle how the data is presented and interacted
views in Django? with., B) Models are responsible for user interface,
and views are responsible for data handling., C)
Models and views are independent of each other.,
D) Views are used to create models.
16. How do you create a A) plt.plot(x, y), B) plot(x, y), C) create_plot(x, y), D)
simple line plot with line_plot(x, y)
Matplotlib?
17. Which library is known A) plotly, B) graph, C) interactive_plots, D)
for creating interactive web_charts
and web-based
visualizations?
18. How do you create a 3D A) Using the Axes3D class and the scatter()
scatter plot with method., B) Using the 3dplot() function., C) Using
Matplotlib? the plot3d() method., D) 3D plots are not
supported by Matplotlib.
19. What are some A) Interactive features, more visually appealing
advantages of using plots, and better support for web applications., B)
Plotly over Matplotlib Simpler to use and more beginner-friendly., C)
for data visualization? Better performance for large datasets., D) Plotly is
always a better choice than Matplotlib.
20. How do you save a A) Using the savefig() method., B) Using the
Matplotlib plot as an save_image() function., C) By copying the plot from
image? the display., D) Saving plots is not supported by
Matplotlib.
21. How do you read data A) df = pd.read_csv('data.csv'), B) df =
from a CSV file into a csv.read('data.csv'), C) df = load_data('data.csv'), D)
Pandas DataFrame? df = DataFrame.from_csv('data.csv')
22. How do you select a A) df['column_name'], B) df.get('column_name'), C)
specific column from a df.select('column_name'), D)
Pandas DataFrame? df.column('column_name')
23. How do you filter rows A) Using boolean indexing (e.g.,
in a Pandas DataFrame df[df['column_name'] > value]), B) Using the filter()
based on a condition? method., C) Using the where() method., D) Using
the select() method.

You might also like