Skip to content
C

Problem 3: Scatter Plot for Study Hours vs Marks

Easypython

Problem Description

Write a Python program that creates a scatter plot showing the relationship between hours studied and marks scored for at least 6 students.

Input

A list of study hours and a corresponding list of marks, for 6 students.

Output

A displayed scatter plot showing the relationship between the two variables.

Constraints

  • Both lists must have exactly 6 matching values.

Example Input

text
study_hours = [1, 2, 3, 4, 5, 6] marks = [35, 45, 55, 65, 78, 88]

Example Output

text
(A scatter plot window showing an upward trend between study hours and marks)

Concepts Covered

plt.scatter(), titles, axis labels.

Input (stdin)

Output

Run your code to see output here...