Question: The program named create _ cities _ db . py given below. Run the program. The program will create a data base named cities.db .

The program named create_cities_db.py given below.
Run the program. The program will create a data base named cities.db.
The cities.db database will have a table named Cities, with the
following columns:
The CityName column stores the name of a city and the Population column stores the population of that city.
After you run the create_cities_db.py program, the Cities table will contain 20 rows with various cities and their populations.
Next, write a program that connects to the cities.db database, and allows the user to select any of the following operations:
Display a list of cities sorted by population, in ascending order.
Display a list of cities sorted by population, in descending order.
Display a list of cities sorted by name.
Display the total population of all the cities.
Display the average population of all the cities.
Display the city with the highest population.
Display the city with the lowest population. in py
 The program named create_cities_db.py given below. Run the program. The program

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!