4. Write a python program generate a function to multiply all the number in the following output.
The output is:
numbers = 2, 5, 7, 9, 1, 2
Expected Answer:
The multiplication of all the given numbers: 1260
Sample Answer:
def multiplication(numbers): sum = 1 for i in numbers: sum *= i return sum print("The multiplication of all the given numbers:", multiplication((2, 5, 7, 9, 1, 2)))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)