wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Ruby Quiz 01 - Sections 1-4

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

Can you do math in Ruby?

a)

Yes

b)

No

2.

Strings...

a)

store(s) their information in a sequence, a list of stored information.

b)

are actions.

c)

is a place to save stuff you might need again, as well as give that stuff a name.

d)

is a list(s) of stored information.

3.

An Array...

a)

store(s) their information in a sequence, a list of stored information.

b)

are actions.

c)

is a place to save stuff you might need again, as well as give that stuff a name.

d)

is a list(s) of stored information.

4.

Methods...

a)

store(s) their information in a sequence, a list of stored information.

b)

are actions.

c)

is a place to save stuff you might need again, as well as give that stuff a name.

d)

is a list(s) of stored information.

5.

A Variable...

a)

store(s) their information in a sequence, a list of stored information.

b)

are actions.

c)

is a place to save stuff you might need again, as well as give that stuff a name.

d)

is a list(s) of stored information.

6.

Could this be a variable in Ruby?


fish = [1, 2, red, blue]

a)

Yes

b)

No

7.

What do square brackets look like?

a)

{ }

b)

( )

c)

[ ]

d)

< >

8.

Which of these are curly brackets?

a)

{ }

b)

( )

c)

[ ]

d)

< >

9.

What are blocks in Ruby?

a)

They let you get a lot more done in a single command.

b)

Tiny, efficiently reusable code words with a colon: :splendid.

c)

Chunks of code which can be tacked on to many of Ruby's methods

10.

What is chaining in Ruby?

a)

Something that lets you get a lot more done in a single command.

b)

Tiny, efficiently reusable code words with a colon: :splendid.

c)

Chunks of code which can be tacked on to many of Ruby's methods