Ruby Basic Terms Flashcards

(43 cards)

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

18
Q

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

19
Q

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

20
Q

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

21
Q

When you use single quote you can’t _______________.

22
Q

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

23
Q

What is the shovel operator for strings?

24
The .concat(variable) ________________ the existing variable
overrides
25
What is it called when you put multiple methods together?
method chaining
26
The class name for a boolean object is a _______________
trueclass
27
The ___________ position is the location of something
index
28
When using two dots for the range method the right side is ________
included
29
When using 3 dots for the range method the right side is _______
not included
30
/n creates a _______ in a string
line break
31
What syntax is used to select a single character for a string?
[ ]
32
A method is first ____________ and then it is _______________
defined invoked
33
The names we give to the inputs are called ____________
parameters
34
A ________________ is a statement that controls if a piece of code executes
conditional
35
A conditional statement always returns a __________ value
boolean
36
The only two inherently falsie values in Ruby are ______________________.
false & nil
37
The ______ symbol is used when checking multiple truth statements that all need to be true
&&
38
The _____ symbol is used when you want to check conditions using OR
||
39
= is the __________ operator
assignment
40
== is the ____________ operator
comparison
41
Another word for a range is an _____________
interval
42
The ____________ turns a range into an array
.to_a