Exercises taken from: http://www.reddit.com/r/dailyprogrammer