Intro to Programming and Data Science (Spring 2020)/Day 4 Coding Challenges: Difference between revisions

From CommunityData
(Copying content from previous class)
 
No edit summary
Line 1: Line 1:
# Rework all of [[Community_Data_Science_Course_(Spring_2019)/Day_3_Coding_Challenges|The day 3 challenges.]]
== Python for Everybody ==
 
Chapter 7: Exercises 1, 2, 3
 
 
== Baby Names ==
Using the baby names data from [[Community_Data_Science_Course_(Spring_2019)/Day_3_Coding_Challenges|The day 3 challenges]]:
# Get the ratio of names that start with each letter.
# Get the ratio of names that start with each letter.
## Do this for boys and girls.
## Do this for boys and girls.
## '''Hint''' First line of output is a boys: 0.10120456305133887 girls: 0.18231978026407467
## '''Hint''' First line of output should be something like:
  a: boys: 0.1002914920750592 girls: 0.17587602795796703
# Are girls or boys more likely to have a name that is used by both genders?
# Are girls or boys more likely to have a name that is used by both genders?
# Figure out how to change the ssadata.py file so that it loads births from 2017 instead of 2018.
== Above and beyond ==
# Figure out how to load two years of birth data simultaneously and compare them (e.g., identify the top 20 names from 2017 and figure out how many more/fewer people were named those names in 2018).

Revision as of 17:08, 22 January 2020

Python for Everybody

Chapter 7: Exercises 1, 2, 3


Baby Names

Using the baby names data from The day 3 challenges:

  1. Get the ratio of names that start with each letter.
    1. Do this for boys and girls.
    2. Hint First line of output should be something like:
 a: boys: 0.1002914920750592 girls: 0.17587602795796703
  1. Are girls or boys more likely to have a name that is used by both genders?
  2. Figure out how to change the ssadata.py file so that it loads births from 2017 instead of 2018.

Above and beyond

  1. Figure out how to load two years of birth data simultaneously and compare them (e.g., identify the top 20 names from 2017 and figure out how many more/fewer people were named those names in 2018).