Skip to content
C

Problem 1: Plot a Sales Trend Line Chart

Easypython

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.

Input (stdin)

Output

Run your code to see output here...