Question
Question 1.2. Write a functionfertility_over_timethat takes the Alpha-3 code of acountryand astartyear. It returns a two-column table with labels Year and Children per woman that
Question 1.2.
Write a functionfertility_over_timethat takes the Alpha-3 code of acountryand astartyear. It returns a two-column table with labels "Year" and "Children per woman" that can be used to generate a line chart of the country's fertility rate each year, starting at thestartyear. The plot should include thestartyear and all later years that appear in thefertilitytable.
Then, in the next cell, call yourfertility_over_timefunction on the Alpha-3 code for Bangladesh and the year 1970 in order to plot how Bangladesh's fertility rate has changed since 1970. Note that the functionfertility_over_timeshould not return the plot itselfThe expression that draws the line plot is provided for you; please don't change it.
def fertility_over_time(country, start):
"""Create a two-column table that describes a country's total fertility rate each year."""
country_fertility =
country_fertility_after_start =
...
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started