Session Ready
Exercise

Apples and oranges

Common knowledge tells you not to add apples and oranges. But hey, that is what you just did, no :-)? The my_apples and my_oranges variables both contained a number in the previous exercise. The + operator works with numeric variables in R. If you really tried to add "apples" and "oranges", and assigned a text value to the variable my_oranges (see the editor), you would be trying to assign the addition of a numeric and a character variable to the variable my_fruit. This is not possible.

Instructions
100 XP
  • Submit the answer and read the error message. Make sure to understand why this did not work.
  • Adjust the code so that R knows you have 6 oranges and thus a fruit basket with 11 pieces of fruit.