WPM0
WPM0
דיוק100%
נפילה0s
זמן הזמן—
דמויות0
תיקון0
טעויות0
התקדמות התקדמות0%
Caps Lock פעיל

תגית: Code Direct Guide

תכנות שפה
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)