Skip to content

Commit

Permalink
Variable name n doesn't conform to snake_case naming style
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Nov 24, 2024
1 parent 5f926a0 commit c3e94b1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kyu_6/sums_of_parts/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"""


def parts_sums(ls: list) -> list:
def parts_sums(input_ls: list) -> list:
"""
The function parts_sums will take as parameter a list ls
The function parts_sums will take as parameter a list input_ls
and return a list of the sums of its parts.
:param ls:
:param input_ls:
:return:
"""
# empty list should return 0
if not ls:
if not input_ls:
return [0]

result: list = []
ls_sum: int = sum(ls)
ls_sum: int = sum(input_ls)
result.append(ls_sum)

for num in ls:
for num in input_ls:
n = ls_sum - num
result.append(n)
ls_sum = n
Expand Down

0 comments on commit c3e94b1

Please sign in to comment.