Question: Complete the implementation of the function get_continent_data below which receives a dictionary (containing the country names as keys and Nation objects as the values) and

Complete the implementation of the function get_continent_data below which receives a dictionary (containing the country names as keys and Nation objects as the values) and a continent name (string), and creates and returns three lists: one containing country names, another list containing female life expectancy and the last list containing male life expectancy. (First examine the Nation class get methods given below) def get_continent_data(d, continent):

""" d is a dictionary which contains the country names as keys and Nation objects as the values.

continent is the name of the continent, which is a str.

Creates and returns three lists: one containing country names, another containing female life expectancy and the last one containing male life expectancy

""" Nation class has the following get methods: get_country(): str,

get_continent(): str,

get_male_life_expectancy(): float,

get_female_life_expectancy: float,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!