1. Home
  2. Data Science
  3. Matplotlib
  4. What is the output of plt.pie([10, 20, 30])?

Added 24 Feb 2024

What is the output of plt.pie([10, 20, 30])?

  1. A pie chart with slices proportional to the given values Correct answer
  2. An error
  3. A scatter plot
  4. A bar plot

Correct answer

A. A pie chart with slices proportional to the given values

17 views

MCQSEXAM

Explanation

It draws a pie chart with slices proportional to the values — 10, 20 and 30 become one-sixth, one-third and one-half of the circle.

Add labels= for names and autopct="%1.1f%%" to print percentages.

Keep preparing with more Data Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Matplotlib MCQs

Practise all Matplotlib MCQs

Similar MCQs