Ask AI
Skip to main content

Reduce list

Function: Reduce list

This action helps you combine a list of numbers into a single value by applying a specific mathematical operation. Imagine you have a list of sales figures, and you want to find their total, or a list of temperatures, and you want to find the highest one. This action performs that aggregation for you.

Input

  • List of Numbers (LIST) The collection of numbers you want to process. This list can contain whole numbers, decimal numbers, or even text that can be converted into numbers (like "10.50" or "?1,234.56").
  • Operation (BINARY-OPERATOR) The mathematical operation you want to apply to the list. You'll select one from a dropdown list of available options:
    • Sum: Adds all numbers in the list.
    • Product: Multiplies all numbers in the list.
    • Mean: Calculates the average of the numbers.
    • Variance: Measures how spread out the numbers are.
    • Max: Finds the largest number in the list.
    • Min: Finds the smallest number in the list.
    • Percentile: (Requires additional input not shown in this description, typically a percentile value)
    • Mean difference: (Advanced statistical operation)
    • Variance difference: (Advanced statistical operation)
    • Normalize: (Advanced statistical operation)
    • Mode: Finds the number that appears most frequently in the list.
    • Sum Difference: (Advanced statistical operation)
    • Population variance: (Advanced statistical operation)
    • Geometric mean: (Advanced statistical operation)

Output

  • Result (RESULT) A single number representing the outcome of the chosen operation applied to your list. This calculated value will be stored in a variable named RESULT (by default) for you to use in subsequent actions.

Execution Flow

Real-Life Examples

Example 1: Calculate Total Sales

You have a list of daily sales figures for the week and want to find the total sales.

  • Inputs:
    • List of Numbers: [150.75, 200.50, 120.00, 310.25, 180.00]
    • Operation: Sum
  • Result: The action calculates the sum of the sales figures, and the variable RESULT will contain 961.50.

Example 2: Find Average Test Score

A teacher wants to find the average score for a class on a recent test.

  • Inputs:
    • List of Numbers: [85, 92, 78, 95, 88, 70, 90]
    • Operation: Mean
  • Result: The action calculates the average of the test scores, and the variable RESULT will contain 85.42857... (approximately 85.43).

Example 3: Identify Highest Temperature

You are tracking daily high temperatures and want to know the warmest day.

  • Inputs:
    • List of Numbers: [22, 25, 19, 28, 23, 26]
    • Operation: Max
  • Result: The action finds the highest temperature in the list, and the variable RESULT will contain 28.