Quiz Stuff

Quiz 10; November 14; 3'30"; 1+1+1+3 pts + 1 pt EC

  1. What is Ruby's counterpart for Python's list class?
  2. What is a notable difference between strings in Ruby and strings in Java?
  3. What is the value of the following Ruby expression? "abc"[10]
  4. Write a Ruby program that prompts the user with "Line?", reads one line, and then prints the length of the line and the line's first character. Example:
    % ruby q10.rb
    Line?
    testing    (typed by user)
    7 chars; first is t.
    %
    

EC (1pt): Write a Ruby question and answer it.