Discuss / Python / Assignment

Assignment

Topic source

遥望君山

#1 Created at ... [Delete] [Delete and Lock User]
class Screen(object):
    
    @property
    def width(self):
        return self.__width

    @property
    def height(self):
        return self.__height

    @width.setter
    def width(self, width):
        self.__width = width

    @height.setter
    def height(self, height):
        self.__height= height

    @property
    def resolution(self):
        return self.__width * self.__height

  • 1

Reply