daily_challenge.py
1
2
3
4
5
6
7
def score(difficulty, ok): if ok is False: return -5 return {'easy':10, 'medium':20, 'hard':30}[difficulty] print(score('medium', True)) # → 20
Challenge · explanation · news · tips
Build better Python instincts
One daily challenge, clear explanations, fresh tech news, and practical tips.
Challenge · Learn · Evolve