The answer is 30. In OOP, objects have state (attributes like num). obj.num starts at 10, then instance_method changes it to 30.
For beginners: self refers to "this specific object." self.num = 30 means "change this object's num to 30, not all objects of this class." Each instance has its own state.