ความเร็วสุทธิ0
WPM0
ความแม่นยำ100%
ย่อเก็บเธรดทั้งหมด0s
เวลา—
อักขระ0
แก้ไขให้ถูกต้อง0
ผิดพลาด0
ความคืบหน้า0%
ปุ่ม Caps Lock บน

คําแนะนําการอ่านโค้ดพร้อม

โปรแกรมภาษา
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)