Quiz on Methods
Test your knowledge of methods in Ruby.
1
What is the result when the following program is executed?
def getSum(y,z)
mysum = y + z
return mysum
end
getSum(5,6)
A)
It gives no output.
B)
(5+6)
C)
11
D)
56
Question 1 of 60 attempted