Ruby Basic Terms Flashcards
(43 cards)
An attribute is a _____________ that an ____________ hasQuality object
Quality object
A ________________ is something an object has the ability to do
method
the ; is a _______________________
terminator
A string is a collection of _________________________
characters
Concatenation is the ____________ of two or more strings
joining
the puts command always includes a ________________________________ after the command is executed.
line break
print does not have a line ____________.
break
p is a way of having a more _______________ line break
descriptive
an expression is an evaluation that includes some form of an ______________
operation
an operator is a __________________ that does something
symbol
the plus sign can be used as a ____________________ tool
concatenation
in ruby variable _____________ do not have to be declared
types
____________ is the ruby representation of the absence of a value
nil
which method converts a number to a string
.to_s
which method converts a string to an integer
.to_i
if you want to figure out what class an object is in after it type _________
.class
if you want to figure out what class an object is in after it type _________
.class
p x.5.floor rounds the number x to the _________________ nearest integer
lowest
p 10.5._________ rounds the number x to the highest nearest integer
ceil
_______________ is when you look through code to make it more efficient
refactoring
A shorter way of writing a = a + 5 is ____________
a += 5
When you use single quote you can’t _______________.
interpolate
True or False? All capital letters are less than lower case letters alphabetically in Ruby.
true
What is the shovel operator for strings?
«