$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #210

Fill the blank

# expose a computed attribute
class Box:
    @____
    def area(self):
        return self.w * self.h

Answer: property (also accepted: property, property())

@property lets the method be read like a plain attribute.
Play Problem Solving ▸