Question: Using Python. Design and implement a class Country that stores the name of the country, its population, area, and population density (i.e. Population/Density). Then write

Using Python. Design and implement a class Country that stores the name of the country, its population, area, and population density (i.e. Population/Density). Then write a python program that reads data from a text file and prints, country with largest population, country with largest density, country with largest population density (it should calculate it). You should create two python files. First, a Country class file and the second is the program that leverages the methods from Country classand prints largest countries within the categories. You might use set() to store country information and do the operations. In your text file, attributes should follow the order, Country, Population, Area. Use the datafile, https://files.fm/u/2rx4kmn8 Example output should look like, Largest Population: China Largest Area: Canada Largest Population Density: China

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!