நிகர WPM0
WPM0
துல்லியம்100%
கடந்தது0s
நேரம்—
எழுத்துகள்0
தவறானது0
பிழைகள்0
முன்னேற்றம்0%

Shift + Enter · Start / Restart

குறியீட்டு வரியில் வழிகாட்டியைப் படிக்கவும்
நிரலாக்க மொழி
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)