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