Question OOP-ENC-0042
MediumWhat is the output of this code?
class Temp:
def __init__(self):
self._c = 0
@property
def c(self):
return self._c
@c.setter
def c(self, v):
self._c = max(-273, v)
t = Temp()
t.c = -500
print(t.c)
- A.
0
- B.
AttributeError
- C.
Sign up free to see the answer and a step-by-step explanation.