Home / Programming MCQs / Ruby MCQs / Question
M
Q. What is the output of the given code? for num in 1..5 puts num*num end
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
In Ruby, what is the keyword used to define a class?
What is the output of given code? string="I'am Learning RUBY Language".downcase string.upcase
What is the method used to convert a value to string in Ruby?
What is the purpose of the yield keyword in Ruby?
What is the method used to check if a string contains a specific substring in Ruby?
Which tool is commonly used for code formatting in Ruby projects?
What is the purpose of the attr_reader method in Ruby classes?
What does the advance method do for a Date object in Ruby?
What is the output of the given code? counter = 1 while counter < 11 puts counter counter+=1 end
Discusssion
Login to discuss.