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