TreeMap Iteration Tutorial
Iterating over the world.
We can iterate over the structure
if we want to process every single country.
Print the name and area of every country in South America.
You may use the following format string to print the details:
Print the name of each country with a population of at least 200 million.
Countries beginning with J
Countries with a larger GDP than UK
Print the name of each country where GDP is greater than that of "United Kingdom"
(The data is a little old)
The countries of OPEC in 2005 are Algeria, Libya, Nigeria, Iran, Iraq, Kuwait, Qatar, Saudi Arabia, United Arab Emerates, Venezuela and Indonesia.
For each of the countries of OPEC, print the name and the GDP.
OPEC and the Middle East.
We can use an
if statement to ensure that only some
countries are printed. Do not change the
list for this question.
For each of the countries of OPEC, print the name and the GDP - only for those OPEC members in the Middle East.