Drop hier links of afbeeldingen om ze aan de editor toe te voegen.
Exercise 1.3.3
- Create a new function in this module that returns the average life expectancy on a given continent for a given year. Call this function with different arguments and compare the results.
To validate this function, enter the following line of code:
avg_life_exp = gapminder.avg_life_exp_by_continent_and_year(gapminder_filepath, 'Europe', '2007')
print(avg_life_exp)
The output should look like this:
Europe life expectancy 2007
77.6486