exercise 2 of  basic ruby