LearnPath

python · beginner · ~15 min

Counter class

Implement class `Counter` with increment(), decrement(), and a value property starting at 0. decrement() must not go below 0.

python editor · loading…

Output

Run to see output.