placeholder image to represent content

DATA VISUALIZATION USING PYPLOT: LINE CHART, PIE CHART AND BAR CHART

Quiz by Karan Cindae

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
10 questions
Show answers
  • Q1

    Which is a python package used for 2D graphics?

    matplotlib.pyplot

    matplotlib.pip

    matplotlib.plt

    matplotlib.numpy

    30s
  • Q2

    Identify the package manager for Python packages, or modules

    python package

    PIP

    plt.show()

    Matplotlib

    30s
  • Q3

    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

    Install PIP

    Check PIP version

    Check if PIP is Installed

    Download a Package

    30s
  • Q4

    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>piplist

    Install PIP

    packages installed

    list command

    List installed packages

    30s
  • Q5

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

    Python –m pip install –U matplotlib

    removing pip

    downloading pip to the latest version

    upgrading pip to the latest version

    upgrading matplotlib to the latest version

    30s
  • Q6

    Observe the output figure. Identify the coding for obtaining this output.

    Question Image

    import matplotlib.pyplot as plt

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

    plt.show()

    import matplotlib.pyplot as plt

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

    plt.show()

    import matplotlib.pyplot as plt

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

    plt.show()

    import matplotlib.pyplot as plt

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

    plt.show()

    30s
  • Q7

    Read the code:

    a. import matplotlib.pyplot as plt

    b. plt.plot(3,2)

    c. plt.show()

    Identify the output for the above coding.

    Answer Image
    Answer Image
    Answer Image
    Answer Image
    30s
  • Q8

    Which key is used to run the module?

    F4

    F3

    F6

    F5

    30s
  • Q9

    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.

    Bar chart

    Line chart

    Pie chart

    Scatter plot

    30s
  • Q10

    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 usingthe Python string formatting

    Statement A is correct

    Statement B is correct

    Both the statements are correct

    Both the statements are wrong

    30s

Teachers give this quiz to your class