Question: this is the question and the code I tried so far, can someone fix if so the last part of the code adds a new

this is the question and the code I tried so far, can someone fix if so the last part of the code adds a new city to the list and also prints it without square brackets and ''. Without using "for" statements
this is the question and the code I tried so far, can
someone fix if so the last part of the code adds a

In this assignment you'll create a dictionary of Illinois cities and their populations. Use city names as keys and their populations as values. Follow the steps to complete the program. 1) Create an empty dictionary and ask the user to input three cities and their populations, add them to a dictionary, then print the dictionary. ( 5 points) 2) Prompt the user to input a city name and display the population of that city, assuming the city is already in the dictionary. (10 points) 3) Expand your program by allowing the user to add one more city to the dictionary, then output the dictionary. ( 5 points) Example: Input the fixst city: chicago Input the population of the city: 2742119 Input the second city: Aurora Input the population of the city: 183447 Input the third city: Joliet Input the population of the city: 150323 \{'Chicago': 2742119, 'Aurora': 183447, 'Joliet': 150323 \} Input a city to find its population: Chicago The population of Chicago is 2742119 Input the name of the city you want to add: Naperville Input its population: 149013 f'Chicago': 2742119, 'Aurora': 183447, 'Joliet': 150323, 'Naperville': 149013\}

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!