Ask Question
6 February, 15:31

Write a loop that prints each country's population in country_pop. Sample output for the given program with input 'China:1365830000, India:1247220000, United States:318463000, Indonesia:252164800': United States has 318463000 people. India has 1247220000 people. Indonesia has 252164800 people. China has 1365830000 people.

+3
Answers (1)
  1. 6 February, 19:22
    0
    Code is as follows

    country_pop={"United States": 318463000, "Indonesia" : 25216480, "India" : 1247220000, "China": 1365830000}

    for key, value in country_pop. items () : print (key + " has " + str (value) + " people.")
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a loop that prints each country's population in country_pop. Sample output for the given program with input 'China:1365830000, ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers