13. Write a python program to generate a function to do the additional operation from different integer undergoing normal mathematics operation.
The output is:
Integer list: [2, 8, 32, 6, 5]
Expected Answer:
The summation of [2, 8, 32, 6, 5] is 53
Sample Answer:
def combine_digits(integers): result= int() for i in integers: result += i return result print("The summation of [2, 8, 32, 6, 5] is", combine_digits([2, 8, 32, 6, 5]))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)