Sección 2. Capítulo 7
single
Challenge: Visualize Class Performance
Desliza para mostrar el menú
Visualizing grades can help teachers quickly identify trends. In this challenge, you'll use matplotlib to create a bar chart of student grades.
Tarea
Swipe to start coding
Write a Python script that takes a dictionary of student grades and generates a bar chart with student names and their corresponding grades.
- Use the keys of the dictionary as the labels for the x-axis.
- Use the values of the dictionary as the heights of the bars.
- Add a label for the x-axis: "Student Name".
- Add a label for the y-axis: "Grade".
- Add a title for the chart: "Class Performance".
- Display the bar chart.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 7
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla