Skip to main content
All CollectionsUnderstand the CommandsData Refining
[Command] Generate a random number
[Command] Generate a random number
Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

The Generate a random number command is used to output a random number within a specified range. It utilizes a pseudorandom number generator to produce a number that is statistically random but generated by a deterministic algorithm. Common use cases include:

  • Generate random input data for modelling complex systems like weather, financial markets, biological interactions

  • Select a random sample from a larger population for statistical analysis

  • Randomize the order of elements in an existing sequence

  • Introduce randomness into games, e.g. by simulating dice

  • Construct unpredictable and hard-to-guess passwords


Parameter Values

Set Parameters

Parameter

Description

Text list

Select a list variable

Minimum number

The lower bound or smallest number that can be generated randomly

Maximum number

The upper bound or highest number that can be generated randomly

Save result as

Set a name for the generated number

Error Handling

Parameter

Definition

When error occurs

Select the action to be performed when an error occurs

  • Terminate the project

  • Ignore the error and execute the next command

  • Retry action


Example

The above workflow can generate a random number between 0 to 10.

Did this answer your question?