Completed ruby exercise 17.