Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: CSCI 195
Views: 5931
Image: ubuntu2004
1
# Ask the user for how many people are in the class
2
3
# Initialize a variable to keep of how many people we’ve entered
4
5
# Initialize an array named month_counts containing 12 zeroes
6
7
# Initialize an array named month_names with ‘Jan’, ‘Feb’, …, ‘Dec’
8
9
# As long as there are more people
10
# Ask for the next person’s birthdate
11
12
# Increment the number of people we have entered
13
14
# Break up into the month and date components using split
15
16
# Find the right index of the element in the array for the month
17
18
# Increment the value in that month by one
19
20
# Create a plot object with no line, just circles, for the month data
21
22
23
# Save that plot to the file birthdays-by-month.png
24
25