Ruby Basic Terms Flashcards

1
Q

An attribute is a _____________ that an ____________ hasQuality object

A

Quality object

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

A ________________ is something an object has the ability to do

A

method

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

the ; is a _______________________

A

terminator

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

A string is a collection of _________________________

A

characters

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

Concatenation is the ____________ of two or more strings

A

joining

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

the puts command always includes a ________________________________ after the command is executed.

A

line break

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

print does not have a line ____________.

A

break

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

p is a way of having a more _______________ line break

A

descriptive

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

an expression is an evaluation that includes some form of an ______________

A

operation

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

an operator is a __________________ that does something

A

symbol

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

the plus sign can be used as a ____________________ tool

A

concatenation

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

in ruby variable _____________ do not have to be declared

A

types

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

____________ is the ruby representation of the absence of a value

A

nil

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

which method converts a number to a string

A

.to_s

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

which method converts a string to an integer

A

.to_i

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

if you want to figure out what class an object is in after it type _________

A

.class

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

if you want to figure out what class an object is in after it type _________

A

.class

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

p x.5.floor rounds the number x to the _________________ nearest integer

A

lowest

18
Q

p 10.5._________ rounds the number x to the highest nearest integer

A

ceil

19
Q

_______________ is when you look through code to make it more efficient

A

refactoring

20
Q

A shorter way of writing a = a + 5 is ____________

A

a += 5

21
Q

When you use single quote you can’t _______________.

A

interpolate

22
Q

True or False? All capital letters are less than lower case letters alphabetically in Ruby.

A

true

23
Q

What is the shovel operator for strings?

A

«

24
Q

The .concat(variable) ________________ the existing variable

A

overrides

25
Q

What is it called when you put multiple methods together?

A

method chaining

26
Q

The class name for a boolean object is a _______________

A

trueclass

27
Q

The ___________ position is the location of something

A

index

28
Q

When using two dots for the range method the right side is ________

A

included

29
Q

When using 3 dots for the range method the right side is _______

A

not included

30
Q

/n creates a _______ in a string

A

line break

31
Q

What syntax is used to select a single character for a string?

A

[ ]

32
Q

A method is first ____________ and then it is _______________

A

defined invoked

33
Q

The names we give to the inputs are called ____________

A

parameters

34
Q

A ________________ is a statement that controls if a piece of code executes

A

conditional

35
Q

A conditional statement always returns a __________ value

A

boolean

36
Q

The only two inherently falsie values in Ruby are ______________________.

A

false & nil

37
Q

The ______ symbol is used when checking multiple truth statements that all need to be true

A

&&

38
Q

The _____ symbol is used when you want to check conditions using OR

A

||

39
Q

= is the __________ operator

A

assignment

40
Q

== is the ____________ operator

A

comparison

41
Q

Another word for a range is an _____________

A

interval

42
Q

The ____________ turns a range into an array

A

.to_a