Question: Overview This is a review assignment where you will use multiple tools you have picked up so far throughout the course. If you're confused about

Overview
This is a review assignment where you will use multiple tools you have picked up so far throughout the course. If you're confused about how to do something make sure you look back at earlier assignments.
In this program you will start by declaring an empty dictionary named population_dict. Then you will use a while-loop to prompt a user for a series of cities and their populations, storing the input in population_dict. After this you will prompt the user to decide what is the maximum population for a city to be considers a small down. Finally, you will open a file called populationdata.txt where you will write the results.
Expected Output
Example of standard out (the console):
What is next city? (enter q to quit) Long Beach
What is the population of Long Beach? 362000
What is next city? (enter q to quit) Los Angeles
What is the population of Los Angeles? 382000000
What is next city? (enter q to quit) San Diego
What is the population of San Diego? 136000000
What is next city? (enter q to quit) Irvine
What is the population of Irvine? 302000
What is next city? (enter q to quit) Detroit
What is the population of Detroit? 606000
What is next city? (enter q to quit) q
What is the largest population for a small town? 1000000
Example of populationdata.txt:
Big Cities:
Los Angeles,382000000
San Diego,136000000
Small Towns:
Long Beach,362000
Irvine,302000
Detroit,606000
Specifications
You should submit a single file called M9A1.py
It should follow the submission standards outlined here: Submission Standards
Your program must declare an empty dictionary named population_dict.
Your program must populate population_dict within a while loop using the input() function to collect input from the user.
Your program must use print() statements to write to a file in the same directory named populationdata.txt.
You are not required to use try/exeception.
Tips and Tricks
There are multiple ways to do this assignment. If you break it down into pieces you'll be fine.
Hard-Coded
Nothing is hard-coded for this file.

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!