Complete the code to define a function that takes one argument and returns it.
my_function <- function([1]) { return([1]) }
The argument name x is used consistently in the function definition and return statement.
Complete the code to call the function with the argument 5.
result <- my_function([1]) print(result)
The function should be called with the number 5, not a string or variable name.
Fix the error in the function definition to correctly set a default argument value of 10.
my_function <- function(x = [1]) { return(x) }
The default value should be the number 10 without quotes.
Fill both blanks to define a function with two arguments where the second has a default value.
my_function <- function([1], [2] = 5) { return([1] + [2]) }
The function uses x and y as argument names, with y having a default value.
Fill all three blanks to create a function that multiplies two arguments and adds a third with a default value.
my_function <- function([1], [2], [3] = 1) { return([1] * [2] + [3]) }
The function uses a, b, and c as argument names, with c having a default value.