- What does the following function
square = function(x) x * x
return when you enter:
square(1:4)
a.) 1
b.) 4
c.) 1, 4, 9, 16
d) 1, 16
- What does this function:
square.plus.y = function(x, plus.y=0)
square(x)+plus.y
return when you enter:
square.plus.y(5, 5)
a. 25
b. 20
c. 30
d. 5, 25, 625, 390625, 152587890625