Final answer:
A dictionary containing the Nile River (Egypt), Amazon River (Brazil), and Mississippi River (United States) is created. Sentences are printed for each river detailing the country it runs through. Additionally, loops are used to print just the rivers and their corresponding countries.
Step-by-step explanation:
Creating a Dictionary of Major Rivers
To demonstrate an understanding of geography and programming, let's create a dictionary of three major rivers and their respective countries:
- Nile River: Egypt
- Amazon River: Brazil
- Mississippi River: United States
Using this dictionary, we can loop through to print statements about each river:
- The Nile River runs through Egypt.
- The Amazon River runs through Brazil.
- The Mississippi River runs through the United States.
Next, we'll loop through the dictionary to print each river:
- Nile River
- Amazon River
- Mississippi River
Last, we'll loop through to print only the countries (the keys of the dictionary):