Skip to content
Closed
24 changes: 24 additions & 0 deletions maths/special_numbers/a_very_big_sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
def a_very_big_sum(arr: list[int]) -> int:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error occurred while parsing the file: maths/special_numbers/a_very_big_sum.py

Traceback (most recent call last):
  File "/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line 146, in parse
    reports = lint_file(
              ^^^^^^^^^^
libcst._exceptions.ParserSyntaxError: Syntax Error @ 2:3.
parser error: error at 1:2: expected one of (, *, +, -, ..., AWAIT, EOF, False, NAME, NUMBER, None, True, [, break, continue, lambda, match, not, pass, ~

def a_very_big_sum(arr: list[int]) -> int:
  ^

"""
Return the sum of all integers in the input array.

>>> a_very_big_sum([2, 4, 6])
12
>>> a_very_big_sum([])
0
"""
total = 0
for i in arr:
total += i
return total

if __name__ == "__main__":
# Example usage
arr = [2, 4, 6, 2, 4, 6, 3]
result = a_very_big_sum(arr)
print(f"Sum of {arr} is {result}")
<<<<<<< HEAD

Check failure on line 20 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:20:7: invalid-syntax: Expected a statement

Check failure on line 20 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:20:5: invalid-syntax: Expected a statement

Check failure on line 20 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:20:3: invalid-syntax: Expected a statement

Check failure on line 20 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:20:1: invalid-syntax: Expected a statement

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error occurred while parsing the file: maths/special_numbers/a_very_big_sum.py

Traceback (most recent call last):
  File "/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line 146, in parse
    reports = lint_file(
              ^^^^^^^^^^
libcst._exceptions.ParserSyntaxError: Syntax Error @ 21:1.
parser error: error at 20:2: expected one of (, *, +, -, ..., AWAIT, EOF, False, NAME, NUMBER, None, True, [, break, continue, elif, else, lambda, match, not, pass, ~

<<<<<<< HEAD
           ^


=======

Check failure on line 23 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:23:7: invalid-syntax: Expected a statement

Check failure on line 23 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:23:5: invalid-syntax: Expected a statement

Check failure on line 23 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:23:3: invalid-syntax: Expected a statement

Check failure on line 23 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:23:1: invalid-syntax: Expected a statement
>>>>>>> 7a0f65306d224f3917a3caf23997f850c21cbb6a

Check failure on line 24 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:24:1: invalid-syntax: Expected a statement

Check failure on line 24 in maths/special_numbers/a_very_big_sum.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

maths/special_numbers/a_very_big_sum.py:23:8: invalid-syntax: Expected a statement
Loading