净 WPM0
WPM0
准确率100%
已用时间0s
时间—
字符数0
错误字符0
错误数0
进度0%
阅读代码练习指南
编程语言
Python
难度
中等

Define a class with state and an increment method.

class Counter:
    def __init__(self, start=0):
        self.value = start

    def increment(self):
        self.value += 1
        return self.value


counter = Counter(3)