Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored May 17, 2022
1 parent 1586a9b commit 370f734
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sum_arrays_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# A function that takes an array, uses a for loop to seperate each number from the array and then adds the number to the "total" each loop


def sum_array(a):
total = 0.0
for number in a:
total += number
return total

0 comments on commit 370f734

Please sign in to comment.