Daily 5-minute Python challenge

One small practice every day. Same challenge for everyone today. Mark it done, then open the full lesson when you want the deeper explanation.

Today · 5 min practice

Tiny counter class

Make a Counter with add(n=1) and value. Add twice, then print value.

Hint: Store self.value in __init__.

Full lesson

python console

Daily challenge · Classes and objects

~/lesson.py

Ctrl+Enter

console output

ready

$ waiting for Run...