This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_grade(array) | |
sum = 0 | |
array.each do |x| | |
sum += x | |
end | |
average = sum / array.length | |
case average | |
when 90...100 | |
grade = 'A' | |
when 80...90 |
(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Stanley Stuart who I forked this form & updated for p484 who originally forked it from Tyler Bird for p392)
This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)
This installs a patched ruby 1.9.3-p392 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets