1. James Taylor
  2. bx-python

Commits

David King  committed 0ce4bd3

Average was getting nan when sum < 0. Now it checks the denominator.

  • Participants
  • Parent commits aa36194
  • Branches default

Comments (0)

Files changed (1)

File aggregate_scores_in_intervals.py

View file
  • Ignore whitespace
                     count += 1
                     max_score = max( score, max_score )
                     min_score = min( score, min_score )
-        if total > 0:
+        if count > 0:
             avg = total/count
         else:
             avg = "nan"