Create a method get_grade that accepts an Array of test scores. Each score in the array should be between 0 and 100, where 100 is the max score.

Compute the average score and return the letter grade as a String, i.e., 'A', 'B', 'C', 'D', 'E', or 'F'.

For example,

# How studious!
get_grade([100, 100, 100]) # => 'A'

Submitted the code in the gist below and it works: 

Now I have to create a hash per the new exercise: 

If you implemented the chosen challenge with an Array, is it possible to implement with a Hash? Or vice versa? Follow the same objectives below, and answer the questions in bold in your gist.

def get_grade(hash) # replace array with a hash as a parameter

  hash = {A: 90..100, B: 80...90, C: 70...80, D: 60...70, E: 50...60, F: 0...50} # create a hash that pairs keys (letter grade) with values (numerical range). Can you use "..." as a value in a hash?

  sum = 0 # default the sum to 0
    hash.each do |key, val|  # iterate and say that in the hash, for each value, you're going to add that value to the sum
      sum += val  # incrimenting the value to the sum
    end
    average = sum / val.length # defining average, which is the sum divided by the value length (val.length)
            # not sure what to do here!
    end
end
