Value of y by age class


  1. Convert your conditional statement from the last exercise into a function called get_y, that takes age_class as an argument and returns y.

  2. Call the function you just created 5 times, once with each of the following values for age_class, and print the values of y:

    • “sapling”,
    • “seedling”,
    • “adult”,
    • “mature”,
    • “established”.