Problem #4: Find the Most Populous Country on Each Continent
Write a function findMostPopulousCountry that takes the variables
“data” and “continents” (returned by the first two functions above
respectively) and returns a list containing the most populous
country on each continent. Call the function and print the list
returned. The list should be in the same order as the continents
appear in the “continents” list. So, for instance, if “Europe” is
the first item in your list of continents, then the most populous
country in Europe should be first in the list returned by
findMostPopulousCountry. Hint: you will need to keep a list
containing the highest population found on each continent so far,
as you search through the data.
language: Python
Problem #4: Find the Most Populous Country on Each Continent Write a function findMostPopulousCountry that takes the var
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Problem #4: Find the Most Populous Country on Each Continent Write a function findMostPopulousCountry that takes the var
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!