# Two dynamically computed attributes with properties

class Powers: 
	def __init__(self, square, cube):
		self._square = square
		self._cube = cube
	def getSquare(self):
		return self._square ** 2
	def setSquare(self, value):
		self._square = value
	square = property(getSquare, setSquare)
	def getCube(self):
		return self._cube ** 3
	cube = property(getCube)

X = Powers(3, 4)
print(X.square)		# 3 ** 2 = 9
print(X.cube)		# 4 ** 3 = 64
X.square = 5		
print(X.square)		# 5 ** 2 = 25




b8643fd95b2215a3668d19c8560a9497cc2043f7
class Powers:

    def __init__(self, square, cube):
        self._square = square
        self._cube = cube

    def getSquare(self):
        return self._square ** 2
    <mask token>
    <mask token>

    def getCube(self):
        return self._cube ** 3
    <mask token>


<mask token>

class Powers:

    def __init__(self, square, cube):
        self._square = square
        self._cube = cube

    def getSquare(self):
        return self._square ** 2

    def setSquare(self, value):
        self._square = value
    <mask token>

    def getCube(self):
        return self._cube ** 3
    <mask token>


<mask token>

class Powers:

    def __init__(self, square, cube):
        self._square = square
        self._cube = cube

    def getSquare(self):
        return self._square ** 2

    def setSquare(self, value):
        self._square = value
    square = property(getSquare, setSquare)

    def getCube(self):
        return self._cube ** 3
    cube = property(getCube)


<mask token>
print(X.square)
print(X.cube)
<mask token>
print(X.square)

class Powers:

    def __init__(self, square, cube):
        self._square = square
        self._cube = cube

    def getSquare(self):
        return self._square ** 2

    def setSquare(self, value):
        self._square = value
    square = property(getSquare, setSquare)

    def getCube(self):
        return self._cube ** 3
    cube = property(getCube)


X = Powers(3, 4)
print(X.square)
print(X.cube)
X.square = 5
print(X.square)

# Two dynamically computed attributes with properties

class Powers: 
	def __init__(self, square, cube):
		self._square = square
		self._cube = cube
	def getSquare(self):
		return self._square ** 2
	def setSquare(self, value):
		self._square = value
	square = property(getSquare, setSquare)
	def getCube(self):
		return self._cube ** 3
	cube = property(getCube)

X = Powers(3, 4)
print(X.square)		# 3 ** 2 = 9
print(X.cube)		# 4 ** 3 = 64
X.square = 5		
print(X.square)		# 5 ** 2 = 25



