Create exercise3.py

This is exercise 3 from Learn the Hard Way Python