Write it yourself

A Python pad in the browser for interview practice: write the function, run it, and test it against the cases each worked solution on this site was checked with.