Sep-25-2020, 09:39 AM
(This post was last modified: Sep-25-2020, 09:42 AM by prasanthbab1234.)
Hi Folks,
Could you please help me to understand how to create new variable that sums the array
create another variable that sums the array arg_numbers. Finish the line that starts with numbs_sum = by calculating the sum of all of numbers in the argument.
1. numbers = [13, 5102, 45, 2301.40, 203, 1502, 3]
Could you please help me to understand how to create new variable that sums the array
create another variable that sums the array arg_numbers. Finish the line that starts with numbs_sum = by calculating the sum of all of numbers in the argument.
1. numbers = [13, 5102, 45, 2301.40, 203, 1502, 3]
numbers_sum = sum(numbers) if len(numbers) >= 1: print(numbers_sum/len(numbers)) else: print(0)