Skip to content

Commit

Permalink
Answers UCL-RITS#100
Browse files Browse the repository at this point in the history
  • Loading branch information
premal-varsani committed Nov 18, 2020
1 parent 9ed24ad commit b2985bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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(squares)


def convert_numbers(list_of_strings):
Expand All @@ -38,7 +38,7 @@ def convert_numbers(list_of_strings):
Example:
--------
>>> convert_numbers(["4", " 8 ", "15 16", " 23 42 "])
[4, 8, 15, 16]
[4.0, 8.0, 15.0, 16.0,23.0,42.0]
"""
all_numbers = []
Expand Down

0 comments on commit b2985bf

Please sign in to comment.