Question 1 of 25
Hints left: 3
Q1
What will we the output of the given code? I'am Learning RUBY Language.downcase
Q2
What is the output of the given code? Ans=Ruby puts "#[Ans] is an oop language"
Q3
Which of the following are valid floating point literal?
Q4
How to comment a single line?
Q5
What does %{Learn ruby language} represents?
Q6
Which of the following type of comments are valid in ruby?
Q7
The .upcase and .capitalize method are used for capitalizing the whole string.
Q8
Why do we use =begin and =end?
Q9
What is the output of the given code? print "What's your first name?" first_name=gets.chomp a=first_name.capitalize a=a.reverse puts"My name is #{a}"
Q10
What will be the output of the given code? "I'am learning Ruby Language".length.reverse.upcase
Q11
What does the notataion \b stands for?
Q12
What is the output of given code? puts "what is your first name?" name=gets.chomp puts "what is your surname?" surname=gets.chomp
Q13
What does %x!ls! represents?
Q14
Which sequence can be used to substitute the value of any ruby expression in a string?
Q15
What will any variable evaluate to if it is of Boolean data type?
Q16
We use semicolon or parentheses after every print or puts statement.
Q17
What is the output of the given code? x, y, z = 12, 36, 72 puts "The value of x is #{ x }." puts "The sum of x and y is #{ x + y }." puts "The average was #{ (x + y + z)/3 }."
Q18
The downcase method changes the whole string to smallcase letters.
Q19
What is the range of octal notation (\nnn)?
Q20
What will we the output of the given code? "I'am Learning RUBY Language".downcase
Q21
What is the role of ! at the end of the capitalize method?
Q22
Which of the following datatypes are valid in Ruby?
Q23
Objects of which class does the integer from the range -2^30 to 2^(30-1) belong to?
Q24
What is the output of the given code? "Ruby Language".length =begin calculate length =end
Q25
Methods should not be written inside double quotes.