Skip to content
CampusEduX

Problem 1: Plot a Sales Trend Line Chart

Easypython
Learn the Concept: Matplotlib

Problem Description

Write a Python program that plots a line chart showing sales figures across 6 months, with a proper title, axis labels, and markers on each data point.

Input

A list of 6 month names and a corresponding list of 6 sales values.

Output

A displayed line chart with title, labeled axes, and markers.

Constraints

  • Both lists must have exactly 6 matching values.

Example Input

text
months = ["Jan","Feb","Mar","Apr","May","Jun"] sales = [100, 150, 130, 170, 200, 180]

Example Output

text
(A line chart window showing sales trend across 6 months, with title "Monthly Sales" and labeled axes)

Concepts Covered

plt.plot(), titles, axis labels, markers.

Related Problems

  • Problem 2: Bar Chart of Subject Scores
    Easy · python
    Solve Problem
  • Problem 3: Scatter Plot for Study Hours vs Marks
    Easy · python
    Solve Problem
  • Problem 4: Histogram of Age Distribution
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...