wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Rubyquiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

A dynamic, reflective, object-oriented, general-purpose programming language. NOT to be confused with Ruby on Rails.

a)

Java

b)

Ruby

c)

Javascript

d)

C++

2.

The ability of a computer program to examine and modify the structure and behavior (specifically the values, meta-data, properties and functions) of the program at runtime.

a)

Object Oriented Programming

b)

Programming Paradigm

c)

Reflective Programming Langauge

d)

Methods

3.

A programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

a)

Reflective Programming Langauge

b)

Methods

c)

Programming paradigm

d)

Object-oriented-programming

4.

A fundamental style of computer programming, serving as a way of building the structure and elements of computer programs.

a)

Programming paradigm

b)

Methods

c)

Object-oriented-programming

d)

Variables in Ruby

5.

Creator of the Ruby programming language.

a)

Isoraku "Isoku" Yamamoto

b)

Yukihiro "Matz" Matsumoto

c)

Kobayashi "Rindo-Senpai" Rindo

d)

Shunsuke "Shunka-san" Nakamura

6.

Ruby does NOT require a keyword when declaring variables. Ruby uses = (assignment operator) to assign values to variables.

a)

Methods

b)

Basic Ruby arithmetic operators

c)

Variables in Ruby

d)

Print

7.

print - takes whatever you give it and prints it to the screenExample:print "Hello World!"

a)

Multi-Line Comments

b)

Single Line Comment

c)

Puts

d)

Print

8.

puts - adds a new (blank) line after the thing you want to print. NOT used with print, use puts rather than print.Example:puts "Hello World!"

a)

Puts

b)

Print

c)

Method

d)

Line Comment

9.

Text that Ruby won't run as code. Single Line Comments are declared using #. Comments are good for clarifying code and reminders.

a)

Multiple Line Comment

b)

Single Line Comment

c)

Comment

d)

Single-Line Comment

10.

The Ruby method for getting input from the user.

a)

puts

b)

print

c)

gets

d)

.chomp