Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Good Evening, I am having this issue. (Python 3) I need a loop that prints each country's population in country_pop. Sample output for the given

Good Evening,

I am having this issue. (Python 3)

I need 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. 

Here is what I have so far, just cant find the right way for my solution.

country_pop = {

'China':1365830000,

'India':1247220000,

'United States': 318463000,

'Indonesia':252164800

} # country populations as of 2014

''' Your solution goes here '''

print(country, 'has', pop, 'people.')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions