Answered step by step
Verified Expert Solution
Link Copied!

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 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

Students also viewed these Databases questions