Robotics & Artificial Intelligence
Write a Python program to plot a pie chart comparing marks of five students as given below:
stud_name = ['Jessica', 'Peter', 'Alexa', 'James', 'Ram']
marks = [48, 22, 14, 30, 49]
Import the necessary libraries.
Python Modules
1 Like
Answer
import matplotlib.pyplot as plt
stud_name = ['Jessica', 'Peter', 'Alexa', 'James', 'Ram']
marks = [48, 22, 14, 30, 49]
plt.pie(marks, labels=stud_name)
plt.title("Marks of Students")
plt.show()
Output

Answered By
1 Like
Related Questions
What are smart homes? Name any two features that make a home a smart home.
Briefly explain Data Exploration from AI project framework.
Name the type of sensor used for each of the following purposes:
(a) Detecting obstacles
(b) Measuring light intensity
(c) Measuring temperatureExplain software theft. Mention any two consequences of software theft.