Averages/Arithmetic mean: Difference between revisions
Content deleted Content added
Added Limbo |
→{{header|Ruby}}: use sum method |
||
Line 2,697: | Line 2,697: | ||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
<lang ruby>def mean(nums) |
<lang ruby>def mean(nums) |
||
nums. |
nums.sum(0.0) / nums.size |
||
end |
end |
||