Question: Python Dictionaries are key-value pairs . Given a python dictionary: populations = {'Shanghai': 17.8, 'Istanbul': 13.3, 'Karachi': 13.0, 'Mumbai': 12.5} write code such that the

Python Dictionaries are key-value pairs. Given a python dictionary:

populations = {'Shanghai': 17.8, 'Istanbul': 13.3, 'Karachi': 13.0, 'Mumbai': 12.5}

write code such that the console prints out

The population of CITY is NUMBER.

where CITY is a key (e.g. "Shanghai") and NUMBER is the city's population.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!