• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back
Name all the 19 Parts of Speech of the Ruby language.
Variables, Global Variables, Instance Variables, Class Variables, Constants, Symbols, Methods, Class Methods, Method Arguments, Numbers, Strings, Blocks, Block Arguments, Ranges, Arrays, Hashes, Regular Expressions, Operators, Keywords,
Part of Speech - any plain, lowercase word.
Variable
Variables can consist of what types of characters?
letters, digits and underscores
Part of Speech - what are these examples of?

x, y, banana2, phone_a_quail
Variables
Two types of Numbers
Integers and Floats
Part of Speech - a series of digits which can start with a plus of minus sign
Integer
Part of Speech - what are these examples of?

1, 23, -1000, 12_000
Integer
Numbers with a decimal point or scientific notation
Float
Part of Speech - what are these examples of?

3.14, -8,08, 12.043e-04
Float
Part of Speech - any sort of characters surrounded by double or single quotes
String
Part of Speech - what are these examples of?

"sealab", '2021', "These cartoons are hilarious"
String
Part of Speech - look like variables, but start with a colon
Symbol
Part of Speech - what are these examples of?

:a, :b, :ponce_de_leon
Symbol
Part of Speech - looks like variables, but capitalized
Constants
Part of Speech - what are these examples of?

Time, Array, Bunny_Lake_Is_Missing, EmpireStateBuilding
Constant
Part of Speech - verbs attached to variables and constants by a dot
Method
Part of Speech - provides additional information to a Method to perform more specific actions
Method Argument
Part of Speech - what are these examples of?

front_door. open
variable.method
Part of Speech - what are these examples of?

front_door.paint( 3, :red)
variable.method.method argument
Part of Speech - usually attached after a variable and/or constant with a double colon
Class Method
Part of Speech - what are these examples of?

Door::new( :oak)
Constant::class method (method argument)
Part of Speech - variables that start with a dollar sign
Global Variable
Part of Speech - what are these examples of?

$1, $x, $chunky
Global Variable
Part of Speech - variables that begin with @ symbol often used to define the attributes of something
Instance Variable
Part of Speech - what are these examples of?

@x, @y,
Instance Variable
Part of Speech - Variables that begin with a double @@ used to define attributes to many related objects
Class Variable
Part of Speech - what are these examples of?

@@x, @@y
Class Variable
Part of Speech - characters surrounded by curly braces to group a set of instructions together so that they can be passed around
Block
Part of Speech - a set of variables surrounded by pipe characters and separated by commas
Block Argument
Part of Speech - two values surrounded by parantheses and separated by an ellipsis...two or three dots
Range
Part of Speech - what are these examples of?

(1..3)
Range
Part of Speech - a list surrounded by square brackets and separated by commas
Array
Part of Speech - what are these examples of?

[1,2,3]
Array
Part of Speech - a dictionary surrounded by curly braces. Dictionaries match words with their definitions. Ruby does so with arrows made from an equal sign followed by a greater than sign
Hash
Part of Speech - what are these examples of?

{'a' => 'aardvark'}
Hash
Part of Speech - a set of characters surrounded by slashes used to find words or patterns in text
Regular Expression
Part of Speech - what are these examples of?

/ruby
Regular Expression
Part of Speech - characters used to do math to compare things
Operator
Part of Speech - built in words, imbued with meaning that cannot be used as variables of changed
Keywords