Initialize the value of the product to 1(not 0 as 0 multiplied with anything returns zero). Traverse till the end of the list, multiply every number with the product. The value stored in the product at the end will give you your final answer.
Ответы
Ответ дал:
0
Ответ:
Given a list, print the value obtained after multiplying all numbers in a list.
Examples:
Input : list1 = [1, 2, 3]
Output : 6
Explanation: 1*2*3=6
Input : list1 = [3, 2, 4]
Output : 24
Вас заинтересует
1 год назад
2 года назад
8 лет назад
8 лет назад
9 лет назад