Ruby Basics
by Kwiz
Qs
12
Difficulty
Junior
Plays
3
Record
2:13
Description

This is a basic Ruby quiz that covers some of the essentials

Question Preview
Ruby is what kind of programming language?
Question Preview
The following is a primitive type in Ruby
Question Preview
Variables that start with two '@' symbols are what kind of variables in Ruby
Question Preview
Variables that start with a capital letter are what kind of variables in Ruby
Question Preview
Variables that start a dollar sign are what kind of variables in Ruby
Question Preview
Ruby is an object-oriented general-purpose programming language.
Question Preview
Which of the following is supported by Ruby?
Question Preview
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}"
Question Preview
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 }."
Question Preview
What does %{Learn ruby language} represents?
Question Preview
What does %x!ls! represent?
Question Preview
Which of the following is the valid string method?