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.

ВыберитеНик976476 ВыберитеНик976476    1   21.12.2021 01:28    0

Ответы
aram0071 aram0071  21.12.2021 01:30

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

ПОКАЗАТЬ ОТВЕТЫ
Другие вопросы по теме Информатика