Completed ruby exercises 38 and 39.