Question 1 of 25
Hints left: 3
Q1
Why do we use comments?
Q2
Which method is used to convert a string to lowercase in Ruby?
Q3
How to comment multiple lines in ruby?
Q4
In Ruby, what is the keyword used to define a loop that repeats until a condition is true?
Q5
In Ruby, what is the correct way to define a constant?
Q6
What is the result of the expression: 10 / 3 in Ruby?
Q7
The .length method is used to check number of characters.
Q8
What is the output of the given code? Ans=Ruby puts "#{Ans} is an oop language" puts "It is very efficient langauge" puts "#{expr} is used on rails platform"
Q9
Which of the following is supported by Ruby?
Q10
What will be the output of the given code? "Come let's learn.reverse Ruby.length language".upcase
Q11
The following syntax is used for multiline comment. =begin iam in a multi line comment =end
Q12
Which of the following features does the 2.0 version of ruby supports?
Q13
What is the output of the given code? "Ruby Language".length = begin calculate length = end
Q14
Which of the following is the correct way to define a range in Ruby?
Q15
What will be the output of the given code? "I'am learning Ruby Language".reverse.upcase.length
Q16
first_name,Last_name=gets.chomp,gets.chomp is the correct way to get the input from the user.
Q17
Ruby can be used for developing internet and intranet applications.
Q18
What is the size of an integer data type in ruby?
Q19
What is the correct syntax for a multiline comment in Ruby?
Q20
This the right way to comment a single line. “Ruby”.length # I’m a single line comment!
Q21
Space between 2+5 or 2 + 5 is valid but =begin and = begin is not valid.
Q22
Which method is used to find the length of an array in Ruby?
Q23
What is the output of the expression: "hello" + "world" in Ruby?
Q24
Which of the following is the valid string method?
Q25
What does the 'return' keyword do in Ruby methods?