Retired

Built-in Product Function (retired)

Description:

Make your own product function

  • The product function multiplies all the elements in iterable given as the first argument and returns the product.
  • There will be a second argument (optional, default: 1) to specify the start element to multiply.
  • When the iterable is empty, returns the start element.

For example:

product()  # 1
product([1, 2, 3])  # 1 * 2 * 3
product([1, 2, 3], -1)  # -1 * 1 * 2 * 3
Arrays
Fundamentals

More By Author:

Check out these other kata created by 8fdafs2

Stats:

CreatedJul 4, 2016
Warriors Trained176
Total Skips37
Total Code Submissions575
Total Times Completed67
Python Completions67
Total Stars5
% of votes with a positive feedback rating69% of 36
Total "Very Satisfied" Votes19
Total "Somewhat Satisfied" Votes12
Total "Not Satisfied" Votes5
Total Rank Assessments37
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • 8fdafs2 Avatar
  • FArekkusu Avatar
  • krnets Avatar
Ad