A new Python puzzle every day
Get sharper at code, one puzzle at a time.
Small, realistic Python puzzles, from easy to hard, that you solve by reading the code and reasoning through it. Fix what's broken or write it from scratch, run it, and keep going until the tests pass. Then come back tomorrow for the next one.
average.py
0 of 2 tests passing
✗
average([2, 4, 6]) == 4
Returned 3.3333333333333335, expected 4
✗
average([5]) == 5
Returned 0.0, expected 5