We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Close

You are in Guest Mode!

What you can do in guest mode:

  • Read the lessons
  • Watch the videos

What you can not do in guest mode:

  • Run your code
  • Submit your answers
  • Save your progress
  • View solutions
  • Get help from Boots
  • Take quizzes
  • Unlock achievements and roles

You're on assignment part 2/2 for this lesson.

Inheritance Quiz

Example of inheritance in code:

class RealEstate:
    def __init__(self, location):
        self.__location = location


class Residential(RealEstate):
    def __init__(self, location, bedrooms):
        super().__init__(location)
        self.__bedrooms = bedrooms


class House(Residential):
    def __init__(self, location, bedrooms, yard_size):
        super().__init__(location, bedrooms)
        self.__yard_size = yard_size