This error means that there is a typo in a code. Curvy braset '{' was opened but closed with rond bracet ')'. One should replace ')' with '}' in the code.

Only Second program will have error as x variable is not defined.

arr task: the resulting array wont have second element of first sub-array. [["b"], ["b", 2], ["b", 3], ["c", 1], ["c", 2], ["c", 3]]

Second programe deletes the same element, but now combinations are different. [["b"], ["a", [1, 2, 3]]]

puts arr.index(5) - returns indext of element with value of 5 #puts arr.index[5] - returns error puts arr[5] - returns 8 as it is element with index 5

problem with names['margaret'] = 'jody' is that Ruby expects index (integer) in sqare braces. It can be fixed by putting index of 'margaret' element. If index is unknown following code works names[names.index('margaret')] = 'jody'

merge - returns new hash, merge! - adds to existing

Hashes: in the first key is symbol x, in the second it is variable x

  1. false

  2. false

  3. false (true can be variable, so may be an error)

  4. true

  5. true

  6. false

  7. did you get it right?

  8. Alright now!

there should be two end statements

A. gives x the value of 2 B. shows 2 C. shows "joe" D. gives var four the value "four" E. shows nothing

Scream: will be error delete return statement, should work. will return Yipee!!!

inputs to method the wrong number of arguments