Skip to content

Commit

Permalink
Making first steps in task UCL-RITS#100
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidScobie committed Nov 18, 2020
1 parent 9ed24ad commit 60806d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions week06/average-squares-example/average_squares/squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def average_of_squares(list_of_numbers, list_of_weights=None):
for number, weight
in zip(list_of_numbers, effective_weights)
]
return sum(squares)
return (sum(squares))/(len(list_of_numbers))


def convert_numbers(list_of_strings):
Expand All @@ -51,8 +51,8 @@ def convert_numbers(list_of_strings):


if __name__ == "__main__":
numbers_strings = ["1","2","4"]
weight_strings = ["1","1","1"]
numbers_strings = ["2","4"]
weight_strings = ["1","0.5"]

numbers = convert_numbers(numbers_strings)
weights = convert_numbers(weight_strings)
Expand Down

0 comments on commit 60806d1

Please sign in to comment.