Page 1 of 1

Problem #3: Find the Areas of the Continents Write a function findContinentAreas which takes the variables “data” and “c

Posted: Wed Apr 27, 2022 3:13 pm
by answerhappygod
Problem #3: Find the Areas of the Continents Write a function
findContinentAreas which takes the variables “data” and
“continents” as parameters (produced by the last two functions
respectively) and returns a list of the areas of the continents
obtained by adding up the areas of the countries 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, the area of Europe should be the first item in your
list of areas. Hint: you might want to start with a list containing
as many zeros as there are continents, and then add the area of
each country onto an element of this list depending on what
continent it is in. The index() method, which works on lists, may
help you here.
language: Python