Skip to content

Commit

Permalink
Corrected erroneous docstrings for average_of_squares function.
Browse files Browse the repository at this point in the history
  • Loading branch information
zclcels committed Nov 10, 2024
1 parent 898fa6f commit 661da25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions squares.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def average_of_squares(list_of_numbers, list_of_weights=None):
Example:
--------
>>> average_of_squares([1, 2, 4])
7.0
21
>>> average_of_squares([2, 4], [1, 0.5])
6.0
12.0
>>> average_of_squares([1, 2, 4], [1, 0.5])
Traceback (most recent call last):
AssertionError: weights and numbers must have same length
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
Binary file added squares.pyc
Binary file not shown.

0 comments on commit 661da25

Please sign in to comment.