pinsker025
27.05.2023 10:23

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.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
катябэд37
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

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота