1. Write a python program to add in all the numbers with using function.
The output is:
numbers = (58, 5, 13, 1, 27)
Expected Answer:
The sum of number (58, 5, 13, 1, 27): 104
Sample Answer:
def add(numbers): sum = 0 for i in numbers: sum += i return sum print("The sum of number (58, 5, 13, 1, 27):", add((58, 5, 13, 1, 27)))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)