My solution for Challenge #159  in subreddit /r/dailyprogrammer/