Need help in Python
I am trying to a simple program in the Python computer programming language . The program is to have two functions: a main function and a helper function. The main function shall do the following:
declare an array that can hold 20 integer values
use a loop to put the integer values 1, 2, 3, ..., 18, 19, 20 into the array
pass the array to the helper function which will return an integer value
print out the value returned by the helper function
The helper function shall do the following:
traverse the array adding the odd values found in the array
return the sum of the values.
The end result is that the program prints out the value 100.
Notes: Use local variables rather than global variables, if supported in the implementation language.