Exam 6: Working With Collections of Data

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The reverse method can be used to generate a list of array items in the opposite order that they are actually stored.

(True/False)
4.7/5
(41)

Values stored within an array are referenced based on their index position within the array.

(True/False)
4.8/5
(35)

As arrays grow in size it takes more and more time to process and retrieve array items.

(True/False)
4.9/5
(32)

What happens if you accidentally assign a new value to a hash using a key that already exists?

(Multiple Choice)
4.8/5
(47)

The Array class's pop method is used to delete an item from the end of an array.

(True/False)
4.8/5
(33)

Which of the following methods can be used to retrieve a series of items from an array?

(Multiple Choice)
4.9/5
(40)

Which of the following methods allows you to delete an array item based on its value?

(Multiple Choice)
4.7/5
(38)

Which of the following methods can be used to determine if an array contains any items.

(Multiple Choice)
4.9/5
(36)

Which of the following methods automatically iterates once for each item stored in an array?

(Multiple Choice)
4.8/5
(39)

The inspect method can be used to convert the contents of a hash into an array and vice versa.

(True/False)
4.7/5
(34)

Which of the following statements is not valid?

(Multiple Choice)
4.9/5
(25)

Taking the output of one method and using it as input for a subsequent method is accomplished through a process referred to as ____ the two methods together.

(Multiple Choice)
4.9/5
(34)

Ruby permits the specification of a negative integer value when referring to array values. An index value of -2 would refer to which item in an array?

(Multiple Choice)
4.7/5
(45)

Every item stored within a hash is assigned both a key as well as a unique index position.

(True/False)
4.9/5
(43)

What is a collection of key-value pairs called?

(Multiple Choice)
4.9/5
(34)

Ruby permits the use of both real number and integers as index position values.

(True/False)
4.7/5
(46)

Ruby arrays start with an index position of ____?

(Multiple Choice)
4.8/5
(34)

The following statement is an example of chaining methods together. fruit.sort.reverse.inspect

(True/False)
4.8/5
(41)

Although the each loop can be used to process the content of an array, you are generally better off using a while or until loop.

(True/False)
4.9/5
(38)

One way of creating a new hash is to take the contents of two existing hashes and combine them together using the _______________ method.

(Multiple Choice)
4.8/5
(36)
Showing 21 - 40 of 46
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)