Shift + Enter · শুরু / আবার শুরু
কোডের নির্দেশিকা পড়ুন
- প্রোগ্রামিং ভাষা
- 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)