Begining Flashcards

You may prefer our related Brainscape-certified flashcards:
0
Q

What is the prompt?

A

The prompt. Typing code into the prompt gives you an answer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What is a string?

A

A string is a set of characters the computer can process.

Imagine the letters are on a string of laundry line and the quotes are clothespins holding the ends. The quotes mark the beginning and end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are numbers and strings in Ruby?

A

Numbers and strings are Ruby’s math and text objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are methods?

A

Methods are actions!

You’ve used English-language methods like reverse and symbolic methods like * (the multiplication method).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What converts things to strings?

A

to_s converts things to strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What converts things to integers?

A

to_i converts things to integers (numbers.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What converts things to arrays?

A

to_a converts things to arrays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are arrays?

A

They are lists for storing things.
Arrays are lists for storing things in order.
Typed in a pair of brackets, e.g., : [12, 37, 43 ].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a list?

A

Lists store things in order.

Like standing in line for popcorn. You are behind someone and you wouldn’t dream of pushing them aside, right? And the guy behind you, you’ve got a close eye on him, right?
Here’s a list for you. Lottery numbers: [12, 47, 35].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an empty list?

A

[ ] is an empty list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a variable?

A

A variable saves a thing and gives it a name.

Use an = sign, e.g., ticket = [14, 37, 18].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are hashes?

A

The little dictionary with the curly pages { }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are symbols?

A

Symbols are tiny efficient code words with a colon:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are Blocks?

A

Blocks. Chunks of code which can be tacked on to many of Ruby’s methods. Here’s the code you used to build a scorecard: books.values.each { |rate| ratings[rate] += 1 }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Blocks are always associated with/attached to what?

A

Blocks are always associated with/attached to Methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Directories?

A

Directories = Folders
Folders have files in them.
On your computer, you probably have a lot of different files. Files with pictures in them, files with programs in them. And files are often organized into folders, also called: directories.
I’ve prepared a few directories for you. Take a look: Dir.entries “/”

16
Q

What is the top Directory?

A

The Root Directory is the top directory.