Question 2: CSV|Chart

Ella is a dedicated teacher who wants to track her students’ test scores over the school year. She aims to collect test scores from her students, save this data to a CSV file, and visualize the scores using a bar chart. This will help her understand the performance trends and identify areas where students need improvement.

Scenario:

Ella’s tasks involve several steps:

  1. Collect Student Scores:

    • Ella needs to collect test scores for each student in her class.
    • Each student has scores for subjects like Math, English, Science, and History.
  2. Save Data to CSV:

    • After collecting the scores, Ella will save this data to a CSV file named student_scores.csv.
  3. Visualize Scores:

    • Ella wants to create a bar chart to visualize the average scores for each subject.

Let’s create a Python program to help Ella with her tasks

STEPS

  1. Collect Scores:

    • Collects student name and scores for Math, English, Science, and History.
    • Saves the data to a CSV file named student_scores.csv.
  2. Visualize Scores:

    • Reads the CSV file.
    • Displays the data in a table.
    • Creates and displays a bar chart of the average scores for each subject using Plotly.

This program will help Ella efficiently collect and visualize her students’ test scores.

Write what you are looking for, and press enter to begin your search!