Code for various pythonchallenge.com problems