Factorial

BlockMath

Calculate the factorial of a number.

Inputs

NumberRequired

Must be a positive integer less than 20000.

Example: 5

Outputs

Factorial

Computed factorial value.

Example: 120

Build a bot using blocks like Factorial

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: factorial_basic
  • Value block: it can be used directly inside expressions, e.g. "Result: " + factorial_basic(Args{...}).

Inputs

FieldInventScript nameValue
Numbernumbere.g. "5"

Outputs

FieldInventScript nameValue
Factorialfactoriale.g. "120"

Example InventScript

factorial := factorial_basic(Args{number: 5})
send_text_message(Args{channel_id: trigger.channel_id, message_content: "Factorial: " + factorial})

More math blocks