...

/

Quiz on Methods

Quiz on Methods

Take a quiz on methods.

We'll cover the following...
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
Loginto save progress

Flow of Execution

Exercise 1: Greet a Person

Loginto save progress