This is one of the solutions for a ruby quiz.