Код: Выделить всё
TypeError: sum_array() takes 1 positional argument but 5 were given
Код: Выделить всё
def sum_array(arr):
total = 0
for i in range(len(arr)):
total += arr[i]
return total
result = sum_array(1,2,3,4,5)
print("Sum of array:", result)`
Подробнее здесь: https://stackoverflow.com/questions/791 ... ray-values
Мобильная версия