R Programming Fundamentals Question 40