Country class

Declare / Implement class Country, which represents a
country with a name, a population, and an area.

  1. Define a contructor, __init__() to take clients' data
  2. Define a method, is_larger() that takes two Country objects
    and returns True if and only if the first has a larger area than the second.
  3. Define a method, population_density() that returns
    the population density of the country (people per square kilometer).
  4. Define a method, __str__ that returns a string representation
    of the country in the format shown below.

Country objects

  1. Create two Country objects below.
    canada = Country('Canada', 34482779, 9984670)
    usa = Country('United States of America', 313914040, 9826675)
  2. Call canada.is_larger(usa) and print the result about which country has larger area than the other country.
  3. Find the population density of each obect.
  4. Print information of each object.