Ad
Mathematics
Algorithms
Logic
Numbers
Data Types
Code
Diff
  • def average(grades)
      grades.sum.to_f / grades.size unless grades.empty?
    end 
    • def average(grades)
    • grades.sum.fdiv(grades.length)
    • grades.sum.to_f / grades.size unless grades.empty?
    • end