Problem 3: Create a Scatter Plot with Categorical Coloring
Easypython
Problem Description
Write a Python program that creates a scatter plot of "hours studied" vs "score", with points colored by "study_group" using the hue parameter.
Input
A DataFrame with "hours", "score", and "study_group" columns.
Output
A displayed, color-coded scatter plot.
Constraints
- At least 3 different groups.
Example Input
text{"hours": [2,3,5,6,8,9], "score": [65,70,80,85,90,95], "study_group": ["A","A","B","B","C","C"]}
Example Output
text(A scatter plot with 3 distinctly colored groups of points)
Concepts Covered
sns.scatterplot(), hue.