Quiz on Methods
Take a quiz on methods.
1
Which statement is correct, given the following code?
def foo(number)
return number + number
end
def bar(number)
number + number
end
A)
foo
isn’t well defined.
B)
bar
isn’t well defined.
C)
Both methods are well defined but produce different outputs.
D)
Both methods are well defined and have the same output.
Question 1 of 30 attempted