Topic: Chapter 16: Data visualization using pyplot (Test 1)



Topic: Chapter 16: Data visualization using pyplot
  • «
  • Test: 1(current)
  • «
Q.1
Which is a python package used for 2D graphics?
A. matplotlib.pyplot
B. matplotlib.pip
C. matplotlib.numpy
D. matplotlib.plt
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.2
Identify the package manager for Python packages, or modules.
A. Matplotlib
B. PIP
C. plt.show()
D. python package
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.3

Read the following code: Identify the purpose of this code and choose the right option from the following.

C:\Users\YourName\AppData\Local\Programs\Python\Python36-32\Scripts>pip – version

A. Check if PIP is Installed
B. Install PIP
C. Download a Package
D. Check PIP version
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.4

Read the following code: Identify the purpose of this code and choose the right option from the following.

C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip list

A. List installed packages
B. list command
C. Install PIP
D. packages installed
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5

To install matplotlib, the following function will be typed in your command prompt. What does “-U”represents?

Python –m pip install –U pip
A. downloading pip to the latest version
B. upgrading pip to the latest version
C. removing pip
D. upgrading matplotlib to the latest version
Answer : Option B
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6
Observe the output figure. Identify the coding for obtaining this output.


A.

import matplotlib.pyplot as plt

plt.plot([1,2,3],[4,5,1])

plt.show()
B.

import matplotlib.pyplot as plt

plt.plot([1,2],[4,5])

plt.show()
C.

import matplotlib.pyplot as plt

plt.plot([2,3],[5,1])

plt.show()
D.

import matplotlib.pyplot as plt

plt.plot([1,3],[4,1])

plt.show()
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.7

Read the code:

a. import matplotlib.pyplot as plt

b. plt.plot(3,2)

c. plt.show()

Identify the output for the above coding.
A.
B.
C.
D.
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report
Q.8
Which key is used to run the module?
A. F6
B. F4
C. F3
D. F5
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9

Identify the right type of chart using the following hints.    

Hint 1: This chart is often used to visualize a trend in data over intervals of time.

Hint 2: The line in this type of chart is often drawn chronologically.

A. Line chart
B. Bar chart
C. Pie chart
D. Scatter plot
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.10

Read the statements given below. Identify the right option from the following for pie chart.

Statement A: To make a pie chart with Matplotlib, we can use the plt.pie() function.

Statement B: The autopct parameter allows us to display the percentage value using the Python string formatting.

A. Statement A is correct
B. Statement B is correct
C. Both the statements are correct
D. Both the statements are wrong
Answer : Option C
Explaination / Solution:
No Explaination.


Workspace
Report


  • «
  • Test: 1(current)
  • «