Select an option to see the answer and solution.
Basic Syntax in Ruby
practice.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
134
Questions
4/7
Page
Pick an option on a question to see the right answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Ans=Ruby
puts "#{Ans} is an oop language"
puts "It is very efficient langauge"
puts "#{expr} is used on rails platform"Select an option to see the answer and solution.
“Ruby”.length # I’m a single line comment!Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
"Ruby Language".length
= begin
calculate length
= endSelect an option to see the answer and solution.
"I'am learning Ruby Language".reverse.upcase.lengthSelect an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
"Come let's learn.reverse Ruby.length language".upcaseSelect an option to see the answer and solution.
string="I'am Learning RUBY Language".downcase
string.upcaseSelect an option to see the answer and solution.
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}"Select an option to see the answer and solution.
ruby.reverseSelect an option to see the answer and solution.
print "what's your first name?"
first_name=gets.chomp
a=first_name.capitalize
"first_name.capitalize!".reverse
puts"My name is #{first_name}"Select an option to see the answer and solution.
"Iam learning ruby language".lengthSelect an option to see the answer and solution.