Write a Python program to plot a pie chart comparing pollution ranking of five countries as given below:

ICSE Class 10 Robotics & AI PYQ · 2026 Improvement · Section B

4(iii)Written · 2026 · Section B · 2026 Improvement

Write a Python program to plot a pie chart comparing pollution ranking of five countries as given below:

Country = ['Russia', 'India', 'China', 'Bangladesh', 'Nepal']
Pollution = [4, 2, 3, 1, 5]

Import the necessary libraries.

Show SolutionHide Solution↓
import matplotlib.pyplot as plt

Country = ['Russia', 'India', 'China', 'Bangladesh', 'Nepal']
Pollution = [4, 2, 3, 1, 5]

plt.pie(Pollution, labels=Country)
plt.title("Pollution Ranking of Countries")
plt.show()

Output

Write a Python program to plot a pie chart comparing pollution ranking of five countries as given below: Import the necessary libraries. 2026 Board Paper, ICSE 2026 Robotics & Artificial Intelligence Solved Question Paper.
← Previous questionNext question →

Browse the free Robotics & AI sample bank