Created
November 8, 2016 14:45
-
-
Save masonfmatthews/c4302167dcb90e7a7c15e41eeb4e1c6e to your computer and use it in GitHub Desktop.
Questionnaire Ruby Code
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 do_stuff(big_thing, important_name) | |
answer = 0 | |
bottom = 0 | |
big_thing.each do |little_thing| | |
answer += little_thing[important_name] | |
bottom += 1 | |
end | |
answer.to_f / bottom | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment