Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 createcitiesdbpy 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 createcitiesdbpy program, the Cities table will contain 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started