Quiz on Methods
Take a quiz on methods.
We'll cover the following...
We'll cover the following...
Technical Quiz
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.
1 / 3