0

Can anyone help me in this purpose in python.....

a function that takes an array of numbers as parameter, and return the sum. ( name addArrayElements )

29th Sep 2020, 5:03 PM
Shrestha Ray
2 Answers
+ 1
Easy-peasy! At a glance I have two ways to solve. 1. To use built in function sum() 2. create variable with 0 (zero) initial value. Then pass list from for loop each time adding iteration to the variable This is how I can explain it in words. Of course writing in programming lang would be more shorter but, I will not do it
29th Sep 2020, 7:00 PM
Shadoff
Shadoff - avatar
0
Try to solve it yourself first, then post your attempt if you still need help.
29th Sep 2020, 5:17 PM
Zerokles
Zerokles - avatar