- Use a full sheet of 8½ x 11" paper. (Half sheet? Half credit!)
- Put your last name and first initial in the far upper left hand corner!
- No need to write out questions.
- Numbering responses may help you avoid overlooking a question; it's ok to go ahead and pre-number your sheet.
- Four minutes. Two questions and an EC.
- Can everybody see this line?
Quiz 11; November 28; 4'; 1 + 2 points plus 1 point EC
- Write some Ruby code that uses a block to print the values in an Array
a
, one per line.
- Write a Ruby class
Half
that works as follows:
>> h1 = Half.new 7
>> h1.value
=> 3.5
>> Half.new(1).value * 2
=> 1.0
EC (1pt): Write a question involving Ruby iterators or blocks and answer it.