Bar charts
📖 Scenario: You work at a small bakery. You want to show how many cakes of each type you sold last week. A bar chart is a great way to show this information clearly.
🎯 Goal: Create a bar chart that shows the number of cakes sold for each cake type.
📋 What You'll Learn
Create a dictionary with cake types and their sales numbers
Create a list of cake types from the dictionary keys
Create a list of sales numbers from the dictionary values
Use matplotlib to create a bar chart with cake types on the x-axis and sales numbers on the y-axis
Add labels for the x-axis, y-axis, and a title to the chart
Display the bar chart
💡 Why This Matters
🌍 Real World
Bar charts are used in business to show sales, in schools to show test scores, and in many places to compare amounts clearly.
💼 Career
Data analysts and scientists use bar charts to communicate data insights visually to teams and decision makers.
Progress0 / 4 steps