1.

a.
class Country:

    def __init__(self, name, population, area):
        """ (Country, str, int, int)

        A new Country named name with population people and area area.

        >>> canada = Country('Canada', 34482779, 9984670)
        >>> canada.name
        'Canada'
        >>> canada.population
        34482779
        >>> canada.area
        9984670
        """ 

        self.name = name
        self.population = population
        self.area = area

b.

    def is_larger(self, other):
        """ (Country, Country) -> bool

        Return whether this country is larger than other.

        >>> canada = Country('Canada', 34482779, 9984670)
        >>> usa = Country('United States of America', 313914040, 9826675)
        >>> canada.is_larger(usa)
        True
        >>> usa.is_larger(canada)
        False
        """ 

        return self.area > other.area

c.

    def population_density(self):
        """ (Country) -> float

        Return the population density of this country.

        >>> canada = Country('Canada', 34482779, 9984670)
        >>> canada.population_density()
        3.4535722262227995
        """ 

        return self.population / self.area

d.

    def __str__(self):
        """ (Country) -> str

        Return a printable representation of this country.

        >>> usa = Country('United States of America', 313914040, 9826675)
        >>> print(usa)
        United States of America has a population of 313914040 and is 9826675 square km.
        """ 

        return '{} has a population of {} and is {} square km.'.format(
            self.name, self.population, self.area)

e.

def repr(self):
    """ (Country) -> str
Return a concise representation of this country.

canada = Country(‘Canada’, 34482779, 9984670) canada Country(‘Canada’, 34482779, 9984670) [canada] 34482779, 9984670)’, ””“

return "Country('{}', {}, {})".format(
    self.name, self.population, self.area)