Question 1 of 25
Hints left: 3
Q1
What will be the output of the following? "Ruby".reverse.upcase
Q2
Ruby is a case-sensitive language.
Q3
What does %Q{ Learn ruby language } represents?
Q4
Which of the following is not a valid library function?
Q5
What is the output of the given code? my_string=Ruby puts(my_string)
Q6
What is the output of the code? print "What's your first name?" first_name=gets.chomp a=first_name.capitalize first_name.capitalize! print "What's your last name?" last_name=gets.chomp b=last_name.capitalize last_name.capitalize puts "My name is #{first_name} #{last_name}"
Q7
Ruby can be embedded into Hypertext Markup Language(HTML).
Q8
What is the output of the given code? boolean_1 = 77<78 puts(boolean_1)
Q9
What is the output of the following? "Iam learning ruby language".length
Q10
What do we mean by expression substitution?
Q11
What is the output of given code? string="I'am Learning RUBY Language".downcase string.upcase
Q12
What is the output of the given code? print "Hey" puts "Everyone!" print "We are learning Ruby"
Q13
What is the output of the given code? print "what's your first name?" first_name=gets.chomp a=first_name.capitalize "a".reverse puts"My name is #{a}"
Q14
It is must for Ruby to use a compiler.
Q15
What is the output of the the given code? puts "My name is #{Name}"
Q16
Ruby can deal with both numbers and floating point values.
Q17
Ruby is an object oriented general purpose programming language.
Q18
What is the output of the following? ruby.reverse
Q19
What is the output of the given code? print "What's your address" city,state,pin=gets.chomp,gets.chomp,gets.chomp puts "Iam from #{city} city, #{state} state, pincode: #{pin} "
Q20
Why is the library function 'puts'used for?
Q21
What is the output of the given code? “Ruby”.length #to find the length of given string
Q22
What is the output of the given code? print "what's your first name?" first_name=gets.chomp a=first_name.capitalize "first_name.capitalize!".reverse puts"My name is #{first_name}"
Q23
What is the output of the code? print "What's your first name?" first_name=gets.chomp a=first_name.capitalize first_name.capitalize! print "What's your last name?" last_name=gets.chomp b=last_name.capitalize last_name.capitalize! puts "My name is #{first_name} #{last_name}"
Q24
Which of the following is not a valid datatype?
Q25
What is the use of .capitalize method?