Whatsapp Logo

Connect on WhatsApp: +91 74786 38563, Uninterrupted Access, 24x7 Availability, 100% Confidential. Connect Now

Questions Answers

Answer to Question in Python for Joyce

author
Written by Admin

Oct. 8, 2023 • 10 min read

blog image

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

Expert's answer 

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

for key,value in country_pop.items(): print(key +" has "+ str(value) +" people.")

Learn more about our help with Assignments , Upload Your Question.

Stuck With Your Homework?
Get Your Homework Done From Our Expert Writers

Related Articles